Skip to content

Commit 31c8c9f

Browse files
Merge branch 'main' into main
2 parents 47f22e3 + e84989c commit 31c8c9f

File tree

6 files changed

+22
-83
lines changed

6 files changed

+22
-83
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# changesets-gitlab
22

3+
## 0.12.2
4+
5+
### Patch Changes
6+
7+
- [#184](https://github.com/un-ts/changesets-gitlab/pull/184) [`006a7e7`](https://github.com/un-ts/changesets-gitlab/commit/006a7e7404a8f77789d15be6b8a5309adfa7ee60) Thanks [@dylf](https://github.com/dylf)! - fix: remove job token
8+
9+
- [#202](https://github.com/un-ts/changesets-gitlab/pull/202) [`bd3280a`](https://github.com/un-ts/changesets-gitlab/commit/bd3280abe32b3a6314ac30ae90f1793def87b34d) Thanks [@TheHolyWaffle](https://github.com/TheHolyWaffle)! - chore: remove unused @sentry/node dependency
10+
311
## 0.12.1
412

513
### Patch Changes

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ GLOBAL_AGENT_NO_PROXY # Like above but for no proxied requests
4848

4949
GITLAB_HOST # optional, if you're using custom GitLab host, will fallback to `CI_SERVER_URL` if not provided
5050

51-
GITLAB_TOKEN # required, token with accessibility to push
52-
GITLAB_TOKEN_TYPE # optional, type of the provided token in GITLAB_TOKEN. defaults to personal access token. can be `job` if you provide the Gitlab CI_JOB_TOKEN or `oauth` if you use Gitlab Oauth token
51+
GITLAB_TOKEN # required, token with accessibility to push, package registries, and merge request APIs. Note the CI_JOB_TOKEN does not have sufficient permissons
52+
GITLAB_TOKEN_TYPE # optional, type of the provided token in GITLAB_TOKEN. defaults to personal access token. Can be `oauth` if you use Gitlab Oauth (personal access) token..
5353
GITLAB_CI_USER_NAME # optional, username with accessibility to push, used in pairs of the above token (if it was personal access token). If not set read it from the Gitlab API
5454
GITLAB_CI_USER_EMAIL # optional, default `gitlab[bot]@users.noreply.gitlab.com`
5555
GITLAB_COMMENT_TYPE # optional, type of the comment. defaults to `discussion`. can be set to `note` to not create a discussion instead of a thread

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "changesets-gitlab",
3-
"version": "0.12.1",
3+
"version": "0.12.2",
44
"type": "module",
55
"repository": "git+https://github.com/rx-ts/changesets-gitlab.git",
66
"author": "JounQin (https://www.1stG.me) <admin@1stg.me>",
@@ -48,7 +48,6 @@
4848
"@changesets/read": "^0.6.2",
4949
"@gitbeaker/rest": "^39.23.0",
5050
"@manypkg/get-packages": "^1.1.3",
51-
"@sentry/node": "^7.80.1",
5251
"commander": "^11.1.0",
5352
"dotenv": "^16.3.1",
5453
"fs-extra": "^11.1.1",

src/comment.ts

-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import type {
1212
MergeRequestNoteSchema,
1313
NoteSchema,
1414
} from '@gitbeaker/rest'
15-
import { captureException } from '@sentry/node'
1615
import { humanId } from 'human-id'
1716
import { markdownTable } from 'markdown-table'
1817

@@ -282,7 +281,6 @@ export const comment = async () => {
282281
errFromFetchingChangedFiles = `<details><summary>💥 An error occurred when fetching the changed packages and changesets in this MR</summary>\n\n\`\`\`\n${err.message}\n\`\`\`\n\n</details>\n`
283282
} else {
284283
console.error(err)
285-
captureException(err)
286284
}
287285
return {
288286
changedPackages: ['@fake-scope/fake-pkg'],

src/index.ts

+10-21
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,15 @@ export const createApi = (gitlabToken?: string) => {
2828
const token = gitlabToken || env.GITLAB_TOKEN
2929
const host = env.GITLAB_HOST
3030

31-
// we cannot use { [tokenType]: token } now
32-
// because it will break the type of the Gitlab constructor
33-
switch (env.GITLAB_TOKEN_TYPE) {
34-
case 'job': {
35-
return new Gitlab({
36-
host,
37-
jobToken: token,
38-
})
39-
}
40-
case 'oauth': {
41-
return new Gitlab({
42-
host,
43-
oauthToken: token,
44-
})
45-
}
46-
default: {
47-
return new Gitlab({
48-
host,
49-
token,
50-
})
51-
}
31+
if (env.GITLAB_TOKEN_TYPE === 'oauth') {
32+
return new Gitlab({
33+
host,
34+
oauthToken: token,
35+
})
5236
}
37+
38+
return new Gitlab({
39+
host,
40+
token,
41+
})
5342
}

yarn.lock

+1-56
Original file line numberDiff line numberDiff line change
@@ -2891,46 +2891,6 @@
28912891
estree-walker "^2.0.2"
28922892
picomatch "^2.3.1"
28932893

2894-
"@sentry-internal/tracing@7.80.1":
2895-
version "7.80.1"
2896-
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.80.1.tgz#b0e993265aa75743787d84e6c0655ed17e4bac0f"
2897-
integrity sha512-5gZ4LPIj2vpQl2/dHBM4uXMi9OI5E0VlOhJQt0foiuN6JJeiOjdpJFcfVqJk69wrc0deVENTtgKKktxqMwVeWQ==
2898-
dependencies:
2899-
"@sentry/core" "7.80.1"
2900-
"@sentry/types" "7.80.1"
2901-
"@sentry/utils" "7.80.1"
2902-
2903-
"@sentry/core@7.80.1":
2904-
version "7.80.1"
2905-
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.80.1.tgz#ccb85e15495bf0c8b142ca1713408c64e38c9f4c"
2906-
integrity sha512-3Yh+O9Q86MxwIuJFYtuSSoUCpdx99P1xDAqL0FIPTJ+ekaVMiUJq9NmyaNh9uN2myPSmxvEXW6q3z37zta9ZHg==
2907-
dependencies:
2908-
"@sentry/types" "7.80.1"
2909-
"@sentry/utils" "7.80.1"
2910-
2911-
"@sentry/node@^7.80.1":
2912-
version "7.80.1"
2913-
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.80.1.tgz#ceca8c7b5e37cf1537747642eabef23145530ad4"
2914-
integrity sha512-0NWfcZMlyQphKWsvyzfhGm2dCBk5DUPqOGW/vGx18G4tCCYtFcAIj/mCp/4XOEcZRPQgb9vkm+sidGD6DnwWlA==
2915-
dependencies:
2916-
"@sentry-internal/tracing" "7.80.1"
2917-
"@sentry/core" "7.80.1"
2918-
"@sentry/types" "7.80.1"
2919-
"@sentry/utils" "7.80.1"
2920-
https-proxy-agent "^5.0.0"
2921-
2922-
"@sentry/types@7.80.1":
2923-
version "7.80.1"
2924-
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.80.1.tgz#dc720d6f2da0b510d586814451a04a2cdd2f4a9d"
2925-
integrity sha512-CVu4uPVTOI3U9kYiOdA085R7jX5H1oVODbs9y+A8opJ0dtJTMueCXgZyE8oXQ0NjGVs6HEeaLkOuiV0mj8X3yw==
2926-
2927-
"@sentry/utils@7.80.1":
2928-
version "7.80.1"
2929-
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.80.1.tgz#1c719f41b4d2c818363551fc40776a274b71efff"
2930-
integrity sha512-bfFm2e/nEn+b9++QwjNEYCbS7EqmteT8uf0XUs7PljusSimIqqxDtK1pfD9zjynPgC8kW/fVBKv0pe2LufomeA==
2931-
dependencies:
2932-
"@sentry/types" "7.80.1"
2933-
29342894
"@sinclair/typebox@^0.27.8":
29352895
version "0.27.8"
29362896
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
@@ -3527,13 +3487,6 @@ acorn@^8.0.0, acorn@^8.10.0, acorn@^8.4.1, acorn@^8.5.0, acorn@^8.8.0, acorn@^8.
35273487
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b"
35283488
integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==
35293489

3530-
agent-base@6:
3531-
version "6.0.2"
3532-
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
3533-
integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==
3534-
dependencies:
3535-
debug "4"
3536-
35373490
aggregate-error@^3.0.0:
35383491
version "3.1.0"
35393492
resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a"
@@ -4624,7 +4577,7 @@ dayjs@^1.10.0:
46244577
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0"
46254578
integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==
46264579

4627-
debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4:
4580+
debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4:
46284581
version "4.3.4"
46294582
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
46304583
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
@@ -6291,14 +6244,6 @@ html-tags@^3.3.1:
62916244
resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.3.1.tgz#a04026a18c882e4bba8a01a3d39cfe465d40b5ce"
62926245
integrity sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==
62936246

6294-
https-proxy-agent@^5.0.0:
6295-
version "5.0.1"
6296-
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6"
6297-
integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==
6298-
dependencies:
6299-
agent-base "6"
6300-
debug "4"
6301-
63026247
human-id@^1.0.2:
63036248
version "1.0.2"
63046249
resolved "https://registry.yarnpkg.com/human-id/-/human-id-1.0.2.tgz#e654d4b2b0d8b07e45da9f6020d8af17ec0a5df3"

0 commit comments

Comments
 (0)