Skip to content

Commit 8fe1c16

Browse files
authored
Merge pull request #88 from fullstack-devops/bugfix/fix-enterprise-server-url
fix Enterprise server URL
2 parents 97dc73c + bb6e964 commit 8fe1c16

5 files changed

Lines changed: 52 additions & 73 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,13 @@
1010

1111
-
1212

13-
## Notes
14-
15-
-
16-
17-
## Todos
18-
19-
-
20-
2113
## Checklist
2214

2315
- [ ] PR has an informative and human-readable title
24-
- [ ] Changes are limited to a single goal (no scope creep)
25-
- [ ] Code can be automatically merged (no conflicts)
26-
- [ ] Passes all existing automated tests
27-
- [ ] Any _change_ in functionality is tested
28-
- [ ] New functions are documented (with a description, list of inputs, and expected output)
2916
- [ ] Placeholder code is flagged / future todos are captured in comments
30-
- [ ] Visually tested in supported browsers and devices (see checklist below :point_down:)
3117
- [ ] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
3218
- [ ] Reviewers requested with the [Reviewers tool](https://help.github.com/articles/requesting-a-pull-request-review/) :arrow_right:
3319

34-
### Accessibility
35-
36-
- [ ] Keyboard friendly
37-
- [ ] Screen reader friendly
38-
3920
### Other
4021

4122
- [ ] No linting errors or warnings

docs/index.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ The patching of the version only takes effect if the merged branch begins with t
2626

2727
> The tailing `/` behind the alias is **always** requiered!
2828
29-
| SemVer | supported aliases | version example |
30-
| ------ | -------------------------------------------- | --------------- |
31-
| MAJOR | `major` | 1.2.3 => 2.0.0 |
32-
| MINOR | `feature`, `feat` | 1.2.3 => 1.3.0 |
33-
| PATCH | `fix`, `bugfix`, `dependabot` | 1.2.3 => 1.2.4 |
29+
| SemVer | supported aliases | version example |
30+
|--------|-------------------------------|-----------------|
31+
| MAJOR | `major` | 1.2.3 => 2.0.0 |
32+
| MINOR | `feature`, `feat` | 1.2.3 => 1.3.0 |
33+
| PATCH | `fix`, `bugfix`, `dependabot` | 1.2.3 => 1.2.4 |
3434

3535
> see also [override specialties](#override-specialties)
3636
@@ -49,20 +49,20 @@ List of all environmental variables used per CI tool.
4949

5050
#### GitHub Actions
5151

52-
| Environment variable | Description | requiered |
53-
| ------------------------- | --------------------------------------------------------------- |:---------:|
54-
| `GITHUB_API_URL` | Returns the API URL. (Already set in runner) | true |
55-
| `GITHUB_REPOSITORY` | The owner and repository name. (Already set in runner) | true |
56-
| `GITHUB_TOKEN` | Must provided in workflow as `env:` (see examples) | true |
57-
| `GIT_DEFAULT_BRANCH_NAME` | overrides the default branch name (default: `main`) | false |
52+
| Environment variable | Description | requiered |
53+
|---------------------------|--------------------------------------------------------|:---------:|
54+
| `GITHUB_SERVER_URL` | The GitHub-Server URL. (Already set in runner) | true |
55+
| `GITHUB_REPOSITORY` | The owner and repository name. (Already set in runner) | true |
56+
| `GITHUB_TOKEN` | Must provided in workflow as `env:` (see examples) | true |
57+
| `GIT_DEFAULT_BRANCH_NAME` | overrides the default branch name (default: `main`) | false |
5858

5959
#### Jenkins Pipeline
6060

61-
| Environment variable | Description | requiered |
62-
| ------------------------- | --------------------------------------------------------------- |:---------:|
63-
| `JENKINS_URL` | Returns the URL of your Jenkins instance. (Already set) | true |
64-
| `GIT_URL` | Will only be set by using the GitHub Plugin. | true |
65-
| `GITHUB_TOKEN` | Must provided in pipeline as `env.GITHUB_TOKEN` (see examples) | true |
66-
| `GIT_DEFAULT_BRANCH_NAME` | overrides the default branch name (default: `main`) | false |
61+
| Environment variable | Description | requiered |
62+
|---------------------------|----------------------------------------------------------------|:---------:|
63+
| `JENKINS_URL` | Returns the URL of your Jenkins instance. (Already set) | true |
64+
| `GIT_URL` | Will only be set by using the GitHub Plugin. | true |
65+
| `GITHUB_TOKEN` | Must provided in pipeline as `env.GITHUB_TOKEN` (see examples) | true |
66+
| `GIT_DEFAULT_BRANCH_NAME` | overrides the default branch name (default: `main`) | false |
6767

6868
> To see your Jenkins environment variables go to: `${YOUR_JENKINS_HOST}/env-vars.html`

go.mod

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ require (
66
github.com/coreos/go-semver v0.3.0
77
github.com/go-git/go-git/v5 v5.4.2
88
github.com/google/go-github/v39 v39.2.0
9-
github.com/xanzy/go-gitlab v0.60.0
10-
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b
9+
github.com/xanzy/go-gitlab v0.61.0
10+
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a
1111
gopkg.in/yaml.v2 v2.4.0
1212
)
1313

1414
require (
1515
github.com/Microsoft/go-winio v0.5.2 // indirect
16-
github.com/ProtonMail/go-crypto v0.0.0-20220113124808-70ae35bab23f // indirect
16+
github.com/ProtonMail/go-crypto v0.0.0-20220404123522-616f957b79ad // indirect
1717
github.com/acomagu/bufpipe v1.0.3 // indirect
1818
github.com/emirpasic/gods v1.12.0 // indirect
1919
github.com/fatih/color v1.13.0 // indirect
@@ -23,22 +23,22 @@ require (
2323
github.com/google/go-cmp v0.5.7 // indirect
2424
github.com/google/go-querystring v1.1.0 // indirect
2525
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
26-
github.com/hashicorp/go-hclog v1.1.0 // indirect
26+
github.com/hashicorp/go-hclog v1.2.0 // indirect
2727
github.com/hashicorp/go-retryablehttp v0.7.0 // indirect
2828
github.com/imdario/mergo v0.3.12 // indirect
2929
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
30-
github.com/kevinburke/ssh_config v1.1.0 // indirect
30+
github.com/kevinburke/ssh_config v1.2.0 // indirect
3131
github.com/mattn/go-colorable v0.1.12 // indirect
3232
github.com/mattn/go-isatty v0.0.14 // indirect
3333
github.com/mitchellh/go-homedir v1.1.0 // indirect
3434
github.com/sergi/go-diff v1.2.0 // indirect
3535
github.com/xanzy/ssh-agent v0.3.1 // indirect
36-
golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70 // indirect
37-
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
38-
golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7 // indirect
36+
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29 // indirect
37+
golang.org/x/net v0.0.0-20220403103023-749bd193bc2b // indirect
38+
golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb // indirect
3939
golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect
4040
google.golang.org/appengine v1.6.7 // indirect
41-
google.golang.org/protobuf v1.27.1 // indirect
41+
google.golang.org/protobuf v1.28.0 // indirect
4242
gopkg.in/warnings.v0 v0.1.2 // indirect
4343
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
4444
)

go.sum

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpz
3939
github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA=
4040
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
4141
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
42-
github.com/ProtonMail/go-crypto v0.0.0-20220113124808-70ae35bab23f h1:J2FzIrXN82q5uyUraeJpLIm7U6PffRwje2ORho5yIik=
43-
github.com/ProtonMail/go-crypto v0.0.0-20220113124808-70ae35bab23f/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
42+
github.com/ProtonMail/go-crypto v0.0.0-20220404123522-616f957b79ad h1:K3cVQxnwoVf5R2XLZknct3+tJWocEuJUmF7ZGwB2FK8=
43+
github.com/ProtonMail/go-crypto v0.0.0-20220404123522-616f957b79ad/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=
4444
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
4545
github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
4646
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
@@ -144,8 +144,8 @@ github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng
144144
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
145145
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
146146
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
147-
github.com/hashicorp/go-hclog v1.1.0 h1:QsGcniKx5/LuX2eYoeL+Np3UKYPNaN7YKpTh29h8rbw=
148-
github.com/hashicorp/go-hclog v1.1.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
147+
github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM=
148+
github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
149149
github.com/hashicorp/go-retryablehttp v0.6.8/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
150150
github.com/hashicorp/go-retryablehttp v0.7.0 h1:eu1EI/mbirUgP5C8hVsTNaGZreBDlYiwC1FZWkvQPQ4=
151151
github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
@@ -160,8 +160,8 @@ github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c
160160
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
161161
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
162162
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
163-
github.com/kevinburke/ssh_config v1.1.0 h1:pH/t1WS9NzT8go394IqZeJTMHVm6Cr6ZJ6AQ+mdNo/o=
164-
github.com/kevinburke/ssh_config v1.1.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
163+
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
164+
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
165165
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
166166
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
167167
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
@@ -203,8 +203,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
203203
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
204204
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
205205
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
206-
github.com/xanzy/go-gitlab v0.60.0 h1:HaIlc14k4t9eJjAhY0Gmq2fBHgKd1MthBn3+vzDtsbA=
207-
github.com/xanzy/go-gitlab v0.60.0/go.mod h1:F0QEXwmqiBUxCgJm8fE9S+1veX4XC9Z4cfaAbqwk4YM=
206+
github.com/xanzy/go-gitlab v0.61.0 h1:sPeRduwe8/8z32nw/5ogQ8f5GP1X096azK4VEq4d5qI=
207+
github.com/xanzy/go-gitlab v0.61.0/go.mod h1:F0QEXwmqiBUxCgJm8fE9S+1veX4XC9Z4cfaAbqwk4YM=
208208
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
209209
github.com/xanzy/ssh-agent v0.3.1 h1:AmzO1SSWxw73zxFZPRwaMN1MohDw8UyHnmuxyceTEGo=
210210
github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w=
@@ -226,8 +226,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm
226226
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
227227
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
228228
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
229-
golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70 h1:syTAU9FwmvzEoIYMqcPHOcVm4H3U5u90WsvuYgwpETU=
230-
golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
229+
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29 h1:tkVvjkPTB7pnW3jnid7kNyAMPVWllTNOf/qKDze4p9o=
230+
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
231231
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
232232
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
233233
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -289,16 +289,16 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
289289
golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
290290
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
291291
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
292-
golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
293-
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
292+
golang.org/x/net v0.0.0-20220403103023-749bd193bc2b h1:vI32FkLJNAWtGD4BwkThwEy6XS7ZLLMHkSkYfF8M0W0=
293+
golang.org/x/net v0.0.0-20220403103023-749bd193bc2b/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
294294
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
295295
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
296296
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
297297
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
298298
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
299299
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
300-
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg=
301-
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
300+
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a h1:qfl7ob3DIEs3Ml9oLuPwY2N04gymzAW04WsUQHIClgM=
301+
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
302302
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
303303
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
304304
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -350,8 +350,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
350350
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
351351
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
352352
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
353-
golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7 h1:8IVLkfbr2cLhv0a/vKq4UFUcJym8RmDoDboxCFWEjYE=
354-
golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
353+
golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb h1:PVGECzEo9Y3uOidtkHGdd347NjLtITfJFO9BxFpmRoo=
354+
golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
355355
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
356356
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
357357
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -491,8 +491,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
491491
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
492492
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
493493
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
494-
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
495-
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
494+
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
495+
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
496496
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
497497
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
498498
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

src/acigithub/github-client.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"fmt"
77
"log"
88
"os"
9-
"strings"
109

1110
"github.com/google/go-github/v39/github"
1211
"golang.org/x/oauth2"
@@ -15,7 +14,7 @@ import (
1514
var (
1615
GithubClient *github.Client
1716
ctx = context.Background()
18-
githubServerUrl, isgithubServerUrl = os.LookupEnv("GITHUB_ENTERPRISE_SERVER_URL")
17+
githubServerUrl, isgithubServerUrl = os.LookupEnv("GITHUB_SERVER_URL")
1918
githubRepository, isgithubRepository = os.LookupEnv("GITHUB_REPOSITORY")
2019
githubToken, isgithubToken = os.LookupEnv("GITHUB_TOKEN")
2120
owner, repo string
@@ -34,15 +33,14 @@ func NewGitHubClient() (githubClient *github.Client, err error) {
3433
)
3534
githubTc := oauth2.NewClient(context.Background(), gitHubTs)
3635

37-
if !strings.HasSuffix(githubServerUrl, "/") {
38-
githubServerUrl = githubServerUrl + "/"
39-
}
40-
uploadUrl := fmt.Sprintf("%sapi/uploads/", githubServerUrl)
41-
4236
if isgithubServerUrl {
43-
githubClient, err = github.NewEnterpriseClient(githubServerUrl, uploadUrl, githubTc)
44-
if err != nil {
45-
return nil, fmt.Errorf("error at initializing github client: %v", err)
37+
if githubServerUrl != "https://github.com" {
38+
githubClient, err = github.NewEnterpriseClient(githubServerUrl, githubServerUrl, githubTc)
39+
if err != nil {
40+
return nil, fmt.Errorf("error at initializing github client: %v", err)
41+
}
42+
} else {
43+
githubClient = github.NewClient(githubTc)
4644
}
4745
} else {
4846
githubClient = github.NewClient(githubTc)

0 commit comments

Comments
 (0)