un-ts / changesets-gitlab

GitLab CI cli for changesets like its GitHub Action.
https://opencollective.com/unts/projects/changesets-gitlab
MIT License
93 stars 34 forks source link

comment adds new comment with every commit #145

Open maxkarkowski opened 11 months ago

maxkarkowski commented 11 months ago

since we updated changesets-gitlab we have now the issue that with every commit the changesets-gitlab comment command creates a new comment in our merge request. before the update it only created one comment for a merge request.

JounQin commented 11 months ago

Any screenshot?

Should be related to #138 or #143(most likely)

cc @alan910127

alan910127 commented 11 months ago

Hello @maxkarkowski, are you upgraded from v0.11.0 or v0.10.x? This information can help me locate the issue faster 😄

maxkarkowski commented 11 months ago

hey @alan910127 sorry of course i can. we are currently on version 0.10.3

Update: update to latest version and the problem is still there

maxkarkowski commented 11 months ago

Any screenshot?

Should be related to #138 or #143(most likely)

cc @alan910127

here is a screenshot screen

maxkarkowski commented 11 months ago

but even if there is a changeset found, new comment will appear with everey command run

SCR-20231128-idwj
alan910127 commented 11 months ago

Hey @maxkarkowski, I couldn't reproduce the error on a project created on gitlab.com. Could you provide some information that might be related to this issue?

Here's something I think might be relevant:

idumancic commented 11 months ago

@alan910127 I have the same problem, we are using a self-hosted instance of GitLab if that helps, but when I tested on gitlab.com I also did not get any error.

maxkarkowski commented 11 months ago

@alan910127 I have the same problem, we are using a self-hosted instance of GitLab if that helps, but when I tested on gitlab.com I also did not get any error.

we are also using a self hosted gitlab

maxkarkowski commented 11 months ago

Hey @maxkarkowski, I couldn't reproduce the error on a project created on gitlab.com. Could you provide some information that might be related to this issue?

Here's something I think might be relevant:

this is the comment job we have . it runs on every merge request

comment:
  rules:
    - if: '$CI_MERGE_REQUEST_IID && $CI_COMMIT_BRANCH != "changeset-release/main"'
  extends:
    - .init-pnpm
  script:
    - pnpm changesets-gitlab comment # comment automatically like https://github.com/changesets/bot

.init-pnpm:
  before_script:
    - corepack enable
    - corepack prepare pnpm@8.5.1 --activate
    - node --max-old-space-size=8192
    - pnpm config set store-dir .pnpm-store
    - pnpm install # install dependencies
  cache:
    key:
      files:
        - pnpm-lock.yaml
    paths:
      - .pnpm-store
alan910127 commented 11 months ago

Got it. I will try to spin up a self-hosted GitLab instance and test the issue inside that. What's your GitLab version in case it helps?

maxkarkowski commented 11 months ago

Got it. I will try to spin up a self-hosted GitLab instance and test the issue inside that. What's your GitLab version in case it helps?

ist GitLab Community Edition v16.6.0

JounQin commented 11 months ago

I may have opportunity to test and debug this issue on our internal GitLab service today, I'll try to give a fix soon.


I'm meeting bigger issues...:

image
alan910127 commented 11 months ago

@JounQin I have found that the /projects/:id/merge_requests/:merge_request_iid/diffs is only available on GitLab 15.7 or above. However, it's not documented very well though 😕, there is only a mention at the docs for changes API.

image

Reverting #143 could solve the 404 issue and potentially this issue as well.


Update:

Using changesets-gitlab@0.11.0 in a GitLab 13 instance does not have the issue of commenting repeatedly. So, reverting #143 should also solve this one, but there will always be a deprecation warning in the pipeline though 😅.

alan910127 commented 11 months ago

@maxkarkowski @idumancic It should be fixed in version 0.11.4, you can try it out!

Untitled

maxkarkowski commented 11 months ago

@maxkarkowski @idumancic It should be fixed in version 0.11.4, you can try it out!

Untitled

didnt fix it for me :/

JounQin commented 11 months ago

@maxkarkowski Please provide more details, such as GitLab instance version?

maxkarkowski commented 11 months ago

@maxkarkowski Please provide more details, such as GitLab instance version?

it is still GitLab Community Edition v16.6.0. ;) i just updated to the newest version of changesets-gitlab. the pipeline then executes pnpm changesets-gitlab comment . i first commited without a changeset. then i added a changeset and commit this as well. and now i have still 2 comments in my merge request

alan910127 commented 11 months ago

I'm a bit hesitant to admit this, but I'm having difficulty configuring a GitLab CE instance in a newer version with runners correctly. Would anyone be willing to grant me access to their GitLab instance so that I can test for the issue?

maxkarkowski commented 11 months ago

I'm a bit hesitant to admit this, but I'm having difficulty configuring a GitLab CE instance in a newer version with runners correctly. Would anyone be willing to grant me access to their GitLab instance so that I can test for the issue?

sorry for the inconvenience but i cannot share my gitlab instance because it is owned by customer with very sensitive data

idumancic commented 10 months ago

@alan910127 Just wanted to tell you that it's fixed for me, it only generates one comment. Sorry for being so late to respond, honestly I forgot about it.

maxkarkowski commented 10 months ago

@alan910127 Just wanted to tell you that it's fixed for me, it only generates one comment. Sorry for being so late to respond, honestly I forgot about it.

that is weird. can you maybe share what command you execute in your pipeline? i still get multiple comments :/

JounQin commented 10 months ago

@maxkarkowski Maybe you can help to use patch-package to add some logs for debugging? I don't have a GitLab CE v16.6.0 for debugging for you, sorry.

maxkarkowski commented 10 months ago

@maxkarkowski Maybe you can help to use patch-package to add some logs for debugging? I don't have a GitLab CE v16.6.0 for debugging for you, sorry.

what exactly should i do with patch package? run it before changesets-gitlab on my pipeline? i use pnpm so i can only use pnpm patch.

JounQin commented 10 months ago

what exactly should i do with patch package? run it before changesets-gitlab on my pipeline? i use pnpm so i can only use pnpm patch.

Thanks that you're willing to help for debugging.

You can try to patch node_modules/changesets-gitlab/lib/comment.js accordingly.

Mostly you should add some logs at the following:

https://github.com/un-ts/changesets-gitlab/blob/9c6e79263f38d552f65103e6199ef9054d2f2d4a/src/comment.ts#L107-L132

So that we can check why the previous mr was not found.


After seeing api.MergeRequestDiscussions, I have a theory that it could be API changed between MR discussions vs notes.

JounQin commented 10 months ago
# yarn 1
yarn add https://pkg.csb.dev/un-ts/changesets-gitlab/commit/569933f7/changesets-gitlab
# yarn 2, 3
yarn add changesets-gitlab@https://pkg.csb.dev/un-ts/changesets-gitlab/commit/569933f7/changesets-gitlab/_pkg.tgz
# npm
npm i https://pkg.csb.dev/un-ts/changesets-gitlab/commit/569933f7/changesets-gitlab

@maxkarkowski Please help to test.

maxkarkowski commented 10 months ago
# yarn 1
yarn add https://pkg.csb.dev/un-ts/changesets-gitlab/commit/569933f7/changesets-gitlab
# yarn 2, 3
yarn add changesets-gitlab@https://pkg.csb.dev/un-ts/changesets-gitlab/commit/569933f7/changesets-gitlab/_pkg.tgz
# npm
npm i https://pkg.csb.dev/un-ts/changesets-gitlab/commit/569933f7/changesets-gitlab

@maxkarkowski Please help to test.

i will try this. didn't try patching the version yet.

width your version i got the following message

$ pnpm changesets-gitlab comment
(node:181) DeprecationWarning: This endpoint was deprecated in Gitlab API 15.7 and will be removed in API v5. Please use the "allDiffs" function instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
JounQin commented 10 months ago

The warning is not related and expected. Does the comment functionality works as expected?

maxkarkowski commented 10 months ago

The warning is not related and expected. Does the comment functionality works as expected?

no it still creates a new comment with every commit. i try to patch your comment version manually. maybe there es a cache issue with your package at the moment.

JounQin commented 10 months ago

If you're not using note type comment, my fix should be useless. So hope you could help to debug later.

maxkarkowski commented 10 months ago

If you're not using note type comment, my fix should be useless. So hope you could help to debug later.

how can i set it ? as i said, i only execute changesets-gitlab comment. i am happy to help to debug if you tell me what i should do :)

maxkarkowski commented 10 months ago

i console.log user name and some other stuff for now. this is what i got

commenttype discussion
(node:172) DeprecationWarning: This endpoint was deprecated in Gitlab API 15.7 and will be removed in API v5. Please use the "allDiffs" function instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
discussionOrNotes [
  {
    id: '1f59ccbb2bd907ffc5aae85c3518b4772e77cdc8',
    individual_note: false,
    notes: [ [Object] ]
  },
  {
    id: '346f5531edaf107e8eb7503c3a4fce92651a6032',
    individual_note: true,
    notes: [ [Object] ]
  },
  {
    id: 'dd1c2f1963fc0ef9cee9e1e5b87d70e0283fbd31',
    individual_note: false,
    notes: [ [Object] ]
  },
  {
    id: 'e62530b05d537761f6913fc8971211e84da053f5',
    individual_note: true,
    notes: [ [Object] ]
  },
  {
    id: '2e1df10dcd9911c5a80bd7f4925e55cc151f8cf7',
    individual_note: true,
    notes: [ [Object] ]
  },
  {
    id: '179abd8e2837509d2c67548ac19798456deb97ae',
    individual_note: false,
    notes: [ [Object] ]
  },
  {
    id: '1868a73d6844e61a44dc9e030cacba96bc4a096a',
    individual_note: true,
    notes: [ [Object] ]
  },
  {
    id: 'ad3d754b1bc03e4efce056875524d800d818a4b3',
    individual_note: true,
    notes: [ [Object] ]
  },
  {
    id: '180dfd30da6e25196583c39244a7c04c30beb83a',
    individual_note: true,
    notes: [ [Object] ]
  },
  {
    id: '86388cd925748d172b8925754b223bdc04b0e6c4',
    individual_note: true,
    notes: [ [Object] ]
  },
  {
    id: 'a85e19c7009a0203c5ae9f81361d3316b9048ce3',
    individual_note: false,
    notes: [ [Object] ]
  },
  {
    id: '4c2becfc53ea2eaa7e9891cbf010cfc086e2fa55',
    individual_note: true,
    notes: [ [Object] ]
  },
  {
    id: 'b0acc623e5080424089ba4a9f1f4715e27372870',
    individual_note: false,
    notes: [ [Object] ]
  },
  {
    id: '2658e63854981a4e2a080aa1fbf3245a3feb09ca',
    individual_note: false,
    notes: [ [Object] ]
  },
  {
    id: '443e0d02eeaac3609e68a2052656451144f30563',
    individual_note: true,
    notes: [ [Object] ]
  },
  {
    id: '7d0c48ea407725d3cfa094bd981fabfa541a8d7e',
    individual_note: false,
    notes: [ [Object] ]
  },
  {
    id: 'e5d0063177eddc5871c22434f748434b6e49ed11',
    individual_note: true,
    notes: [ [Object] ]
  },
  {
    id: '732d4206b4ea931d943f9acf59a6769738b367b8',
    individual_note: false,
    notes: [ [Object] ]
  },
  {
    id: '511c0645d9d3da13ed09703291c8589bcc469f66',
    individual_note: true,
    notes: [ [Object] ]
  },
  {
    id: '06d0408ef77cf634d91842b77682917a49[95](https://gitlab.aoe.com/project/congstar-congo/design-system/fair/-/jobs/5839664#L95)fb51',
    individual_note: true,
    notes: [ [Object] ]
  }
]
username group_[114](https://gitlab.REDACTED-URL.com/jobs/5839664#L114)_bot2

the user wo created the comment was [@group_114_bot_5c775e3447ee50f45b58355852330c78]

JounQin commented 10 months ago

how can i set it ? as i said, i only execute changesets-gitlab comment. i am happy to help to debug if you tell me what i should do :)

It is controlled by GITLAB_COMMENT_TYPE env, the default value is discussion, if you haven't change it, then no need to test it.

JounQin commented 10 months ago

the user wo created the comment was [@group_114_bot_5c775e3447ee50f45b58355852330c78]

So it seems the username is unique on every CI? Can you try to set the GITLAB_CI_USER_NAME env?

maxkarkowski commented 10 months ago

GITLAB_CI_USER_NAME

this is already set to group_114_bot2

but the comment is created by [@group_114_bot_5c775e3447ee50f45b58355852330c78] for every merge request

JounQin commented 10 months ago

this is already set to group_114_bot2

Then this could be an upstream issue from @gitbeaker/rest?

cc @jdalrymple


Context:

https://github.com/un-ts/changesets-gitlab/blob/9c6e79263f38d552f65103e6199ef9054d2f2d4a/src/comment.ts#L233-L237

It seems @gitbeaker/rest is creating new discussion with different username comparing to

https://github.com/un-ts/changesets-gitlab/blob/9c6e79263f38d552f65103e6199ef9054d2f2d4a/src/utils.ts#L159-L164

maxkarkowski commented 10 months ago

this is already set to group_114_bot2

Then this could be an upstream issue from @gitbeaker/rest?

cc @jdalrymple

Context:

https://github.com/un-ts/changesets-gitlab/blob/9c6e79263f38d552f65103e6199ef9054d2f2d4a/src/comment.ts#L233-L237

It seems @gitbeaker/rest is creating new discussion with different username comparing to

https://github.com/un-ts/changesets-gitlab/blob/9c6e79263f38d552f65103e6199ef9054d2f2d4a/src/utils.ts#L159-L164

so we need to wait for gitbeaker/rest changes?

JounQin commented 10 months ago

@maxkarkowski Or we can also help to debug @gitbeaker/rest.

https://github.com/jdalrymple/gitbeaker/blob/52ef0e622de304d98afb811f4937560edefd8889/packages/core/src/templates/ResourceDiscussions.ts#L101-L122

But after reading the codes I think it could be a GitLab core issue instead...

Can you try a new GitLab usename without bot keyword?

JounQin commented 10 months ago

https://docs.gitlab.com/ee/development/internal_users.html

image

I think I found it. @maxkarkowski

I think we can add a new option (or without an option) to parse such random string as empty. What means group_{group_id}_bot_{random_string} -> group_{group_id}_bot

JounQin commented 10 months ago
# yarn 1
yarn add https://pkg.csb.dev/un-ts/changesets-gitlab/commit/4c11e8af/changesets-gitlab
# yarn 2, 3
yarn add changesets-gitlab@https://pkg.csb.dev/un-ts/changesets-gitlab/commit/4c11e8af/changesets-gitlab/_pkg.tgz
# npm
npm i https://pkg.csb.dev/un-ts/changesets-gitlab/commit/4c11e8af/changesets-gitlab

@maxkarkowski Please help to test the new version. And you may need to change group_114_bot2 to group_114_bot instead. Or just remove that environment.

@alan910127 If you're free, please help to review #156.

alan910127 commented 10 months ago

@alan910127 If you're free, please help to review #156.

Seems like I'm too late, sorry about that 😅.

JounQin commented 10 months ago

@alan910127 Never mind. You can still help to review it to prevent unexpected regressions or bugs.

maxkarkowski commented 10 months ago

i am sorry to say it but i installed the newest version and still get multiple comments

JounQin commented 10 months ago

@maxkarkowski 🤣 Let's debug again.

maxkarkowski commented 10 months ago

@maxkarkowski 🤣 Let's debug again.

what can i do?

JounQin commented 10 months ago

@maxkarkowski As previous, add log at https://github.com/un-ts/changesets-gitlab/blob/99d8c17eaeb822b262209a37e7dd3569bf541530/src/comment.ts#L122-L132 to check why the previous comment unrecognized.

maxkarkowski commented 10 months ago

@maxkarkowski As previous, add log at

https://github.com/un-ts/changesets-gitlab/blob/99d8c17eaeb822b262209a37e7dd3569bf541530/src/comment.ts#L122-L132

to check why the previous comment unrecognized.

if i use pnpm patch i pnly have the compiled js file. i'll try to add some console.logs

maxkarkowski commented 10 months ago
function isChangesetBotNote(note, username, random) {
  console.log("note", note);
  console.log("username", username);
  console.log("random", random);
  if (
    note.author.username === username ||
    (random &&
      note.author.username.match(RANDOM_BOT_NAME_PATTERN)?.[1] === username)
  ) {
    console.log(generatedByBotNote);
    console.log(username);
    note.body.includes(generatedByBotNote);
  } else {
    console.log("else block;");
  }
}

i added some console.logs like this. and the result is

note {
  id: 495260,
  type: 'DiscussionNote',
  body: '###  ⚠️  No Changeset found\n' +
    '\n' +
    'Latest commit: \n' +
    '\n' +
    "Merging this MR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**\n" +
    '\n' +
    '<details><summary>This MR includes no changesets</summary>\n' +
    '\n' +
    "  When changesets are added to this MR, you'll see the packages that this MR includes changesets for and the associated semver types\n" +
    '\n' +
    '</details>\n' +
    '\n' +
    '[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).\n' +
    '\n' +
    "[Click here if you're a maintainer who wants to add a changeset to this MR](https://REDACTEDURL/REDACTEDREPOPATH/-/new/test/changesets-gitlab-new-version?file_name=.changeset/evil-lizards-doubt.md&file=---%0A%0A---%0A%0Afeat%3A%20update%20changesets-gitlab%0A)\n" +
    '\n' +
    '__Generated By Changesets GitLab Bot__',
  attachment: null,
  author: {
    id: 768,
    username: 'group_114_bot_HASH',
    name: '****',
    state: 'active',
    locked: false,
    avatar_url: 'GRAVATARURL',
    web_url: 'https://REDACTEDURL/group_114_bot_HASH'
  },
  created_at: '2023-12-19T10:43:51.351Z',
  updated_at: '2023-12-19T10:43:51.351Z',
  system: false,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: true,
  resolved: false,
  resolved_by: null,
  resolved_at: null,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495262,
  type: null,
  body: 'marked this merge request as **draft**',
  attachment: null,
  author: {
    id: 99,
    username: 'max.karkowski',
    name: 'Karkowski, Max',
    state: 'active',
    locked: false,
    avatar_url: 'https://secure.gravatar.com/avatar/ce5c37b052e79f9fa048081386068c91?s=80&d=identicon',
    web_url: 'https://REDACTEDURL/max.karkowski'
  },
  created_at: '2023-12-19T10:44:35.198Z',
  updated_at: '2023-12-19T10:44:35.203Z',
  system: true,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: false,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495272,
  type: null,
  body: 'added 1 commit\n' +
    '\n' +
    '<ul><li>93b5cbba - feat: add changeset</li></ul>\n' +
    '\n' +
    '[Compare with previous version](/REDACTEDREPOPATH/-/merge_requests/482/diffs?diff_id=291444&start_sha=aa97a9058a48bbe321f66b111dc726111a426a89)',
  attachment: null,
  author: {
    id: 99,
    username: 'max.karkowski',
    name: 'Karkowski, Max',
    state: 'active',
    locked: false,
    avatar_url: 'https://secure.gravatar.com/avatar/ce5c37b052e79f9fa048081386068c91?s=80&d=identicon',
    web_url: 'https://REDACTEDURL/max.karkowski'
  },
  created_at: '2023-12-19T10:50:42.500Z',
  updated_at: '2023-12-19T10:50:42.513Z',
  system: true,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: false,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495273,
  type: 'DiscussionNote',
  body: '###  🦋  Changeset detected\n' +
    '\n' +
    'Latest commit: \n' +
    '\n' +
    '**The changes in this MR will be included in the next version bump.**\n' +
    '\n' +
    '<details><summary>This MR includes changesets to release 1 package</summary>\n' +
    '\n' +
    '  | Name         | Type  |\n' +
    '| ------------ | ----- |\n' +
    '| custom-theme | Patch |\n' +
    '\n' +
    '</details>\n' +
    '\n' +
    'Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).\n' +
    '\n' +
    "[Click here if you're a maintainer who wants to add another changeset to this MR](https://REDACTEDURL/REDACTEDREPOPATH/-/new/test/changesets-gitlab-new-version?file_name=.changeset/bumpy-trains-tap.md&file=---%0A%0A---%0A%0ADraft%3A%20feat%3A%20update%20changesets-gitlab%0A)\n" +
    '\n' +
    '__Generated By Changesets GitLab Bot__',
  attachment: null,
  author: {
    id: 768,
    username: 'group_114_bot_HASH',
    name: '****',
    state: 'active',
    locked: false,
    avatar_url: 'GRAVATARURL',
    web_url: 'https://REDACTEDURL/group_114_bot_HASH'
  },
  created_at: '2023-12-19T10:51:30.037Z',
  updated_at: '2023-12-19T10:51:30.037Z',
  system: false,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: true,
  resolved: false,
  resolved_by: null,
  resolved_at: null,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495280,
  type: null,
  body: 'added 1 commit\n' +
    '\n' +
    '<ul><li>e4876a45 - test: debug username</li></ul>\n' +
    '\n' +
    '[Compare with previous version](/REDACTEDREPOPATH/-/merge_requests/482/diffs?diff_id=291450&start_sha=93b5cbba2e3f7129e991640caa0c028d630f83dd)',
  attachment: null,
  author: {
    id: 99,
    username: 'max.karkowski',
    name: 'Karkowski, Max',
    state: 'active',
    locked: false,
    avatar_url: 'https://secure.gravatar.com/avatar/ce5c37b052e79f9fa048081386068c91?s=80&d=identicon',
    web_url: 'https://REDACTEDURL/max.karkowski'
  },
  created_at: '2023-12-19T10:56:54.710Z',
  updated_at: '2023-12-19T10:56:54.714Z',
  system: true,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: false,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495281,
  type: 'DiscussionNote',
  body: '###  🦋  Changeset detected\n' +
    '\n' +
    'Latest commit: \n' +
    '\n' +
    '**The changes in this MR will be included in the next version bump.**\n' +
    '\n' +
    '<details><summary>This MR includes changesets to release 1 package</summary>\n' +
    '\n' +
    '  | Name         | Type  |\n' +
    '| ------------ | ----- |\n' +
    '| custom-theme | Patch |\n' +
    '\n' +
    '</details>\n' +
    '\n' +
    'Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).\n' +
    '\n' +
    "[Click here if you're a maintainer who wants to add another changeset to this MR](https://REDACTEDURL/REDACTEDREPOPATH/-/new/test/changesets-gitlab-new-version?file_name=.changeset/sixty-teams-warn.md&file=---%0A%0A---%0A%0ADraft%3A%20feat%3A%20update%20changesets-gitlab%0A)\n" +
    '\n' +
    '__Generated By Changesets GitLab Bot__',
  attachment: null,
  author: {
    id: 768,
    username: 'group_114_bot_HASH',
    name: '****',
    state: 'active',
    locked: false,
    avatar_url: 'GRAVATARURL',
    web_url: 'https://REDACTEDURL/group_114_bot_HASH'
  },
  created_at: '2023-12-19T10:57:54.212Z',
  updated_at: '2023-12-19T10:57:54.212Z',
  system: false,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: true,
  resolved: false,
  resolved_by: null,
  resolved_at: null,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495283,
  type: null,
  body: 'added 1 commit\n' +
    '\n' +
    '<ul><li>f2dc6603 - feat: debug even more</li></ul>\n' +
    '\n' +
    '[Compare with previous version](/REDACTEDREPOPATH/-/merge_requests/482/diffs?diff_id=291452&start_sha=e4876a4562f02af2f7e81aee6643bb744debeb23)',
  attachment: null,
  author: {
    id: 99,
    username: 'max.karkowski',
    name: 'Karkowski, Max',
    state: 'active',
    locked: false,
    avatar_url: 'https://secure.gravatar.com/avatar/ce5c37b052e79f9fa048081386068c91?s=80&d=identicon',
    web_url: 'https://REDACTEDURL/max.karkowski'
  },
  created_at: '2023-12-19T10:59:36.752Z',
  updated_at: '2023-12-19T10:59:36.757Z',
  system: true,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: false,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495285,
  type: null,
  body: 'added 1 commit\n' +
    '\n' +
    '<ul><li>443c7a4c - test: debug</li></ul>\n' +
    '\n' +
    '[Compare with previous version](/REDACTEDREPOPATH/-/merge_requests/482/diffs?diff_id=291458&start_sha=f2dc66035c4930cfa2c048cb3a09464f5f4eccc2)',
  attachment: null,
  author: {
    id: 99,
    username: 'max.karkowski',
    name: 'Karkowski, Max',
    state: 'active',
    locked: false,
    avatar_url: 'https://secure.gravatar.com/avatar/ce5c37b052e79f9fa048081386068c91?s=80&d=identicon',
    web_url: 'https://REDACTEDURL/max.karkowski'
  },
  created_at: '2023-12-19T11:05:31.451Z',
  updated_at: '2023-12-19T11:05:31.454Z',
  system: true,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: false,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495260,
  type: 'DiscussionNote',
  body: '###  ⚠️  No Changeset found\n' +
    '\n' +
    'Latest commit: \n' +
    '\n' +
    "Merging this MR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**\n" +
    '\n' +
    '<details><summary>This MR includes no changesets</summary>\n' +
    '\n' +
    "  When changesets are added to this MR, you'll see the packages that this MR includes changesets for and the associated semver types\n" +
    '\n' +
    '</details>\n' +
    '\n' +
    '[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).\n' +
    '\n' +
    "[Click here if you're a maintainer who wants to add a changeset to this MR](https://REDACTEDURL/REDACTEDREPOPATH/-/new/test/changesets-gitlab-new-version?file_name=.changeset/evil-lizards-doubt.md&file=---%0A%0A---%0A%0Afeat%3A%20update%20changesets-gitlab%0A)\n" +
    '\n' +
    '__Generated By Changesets GitLab Bot__',
  attachment: null,
  author: {
    id: 768,
    username: 'group_114_bot_HASH',
    name: '****',
    state: 'active',
    locked: false,
    avatar_url: 'GRAVATARURL',
    web_url: 'https://REDACTEDURL/group_114_bot_HASH'
  },
  created_at: '2023-12-19T10:43:51.351Z',
  updated_at: '2023-12-19T10:43:51.351Z',
  system: false,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: true,
  resolved: false,
  resolved_by: null,
  resolved_at: null,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495262,
  type: null,
  body: 'marked this merge request as **draft**',
  attachment: null,
  author: {
    id: 99,
    username: 'max.karkowski',
    name: 'Karkowski, Max',
    state: 'active',
    locked: false,
    avatar_url: 'https://secure.gravatar.com/avatar/ce5c37b052e79f9fa048081386068c91?s=80&d=identicon',
    web_url: 'https://REDACTEDURL/max.karkowski'
  },
  created_at: '2023-12-19T10:44:35.198Z',
  updated_at: '2023-12-19T10:44:35.203Z',
  system: true,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: false,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495272,
  type: null,
  body: 'added 1 commit\n' +
    '\n' +
    '<ul><li>93b5cbba - feat: add changeset</li></ul>\n' +
    '\n' +
    '[Compare with previous version](/REDACTEDREPOPATH/-/merge_requests/482/diffs?diff_id=291444&start_sha=aa97a9058a48bbe321f66b111dc726111a426a89)',
  attachment: null,
  author: {
    id: 99,
    username: 'max.karkowski',
    name: 'Karkowski, Max',
    state: 'active',
    locked: false,
    avatar_url: 'https://secure.gravatar.com/avatar/ce5c37b052e79f9fa048081386068c91?s=80&d=identicon',
    web_url: 'https://REDACTEDURL/max.karkowski'
  },
  created_at: '2023-12-19T10:50:42.500Z',
  updated_at: '2023-12-19T10:50:42.513Z',
  system: true,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: false,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495273,
  type: 'DiscussionNote',
  body: '###  🦋  Changeset detected\n' +
    '\n' +
    'Latest commit: \n' +
    '\n' +
    '**The changes in this MR will be included in the next version bump.**\n' +
    '\n' +
    '<details><summary>This MR includes changesets to release 1 package</summary>\n' +
    '\n' +
    '  | Name         | Type  |\n' +
    '| ------------ | ----- |\n' +
    '| custom-theme | Patch |\n' +
    '\n' +
    '</details>\n' +
    '\n' +
    'Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).\n' +
    '\n' +
    "[Click here if you're a maintainer who wants to add another changeset to this MR](https://REDACTEDURL/REDACTEDREPOPATH/-/new/test/changesets-gitlab-new-version?file_name=.changeset/bumpy-trains-tap.md&file=---%0A%0A---%0A%0ADraft%3A%20feat%3A%20update%20changesets-gitlab%0A)\n" +
    '\n' +
    '__Generated By Changesets GitLab Bot__',
  attachment: null,
  author: {
    id: 768,
    username: 'group_114_bot_HASH',
    name: '****',
    state: 'active',
    locked: false,
    avatar_url: 'GRAVATARURL',
    web_url: 'https://REDACTEDURL/group_114_bot_HASH'
  },
  created_at: '2023-12-19T10:51:30.037Z',
  updated_at: '2023-12-19T10:51:30.037Z',
  system: false,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: true,
  resolved: false,
  resolved_by: null,
  resolved_at: null,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495280,
  type: null,
  body: 'added 1 commit\n' +
    '\n' +
    '<ul><li>e4876a45 - test: debug username</li></ul>\n' +
    '\n' +
    '[Compare with previous version](/REDACTEDREPOPATH/-/merge_requests/482/diffs?diff_id=291450&start_sha=93b5cbba2e3f7129e991640caa0c028d630f83dd)',
  attachment: null,
  author: {
    id: 99,
    username: 'max.karkowski',
    name: 'Karkowski, Max',
    state: 'active',
    locked: false,
    avatar_url: 'https://secure.gravatar.com/avatar/ce5c37b052e79f9fa048081386068c91?s=80&d=identicon',
    web_url: 'https://REDACTEDURL/max.karkowski'
  },
  created_at: '2023-12-19T10:56:54.710Z',
  updated_at: '2023-12-19T10:56:54.714Z',
  system: true,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: false,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495281,
  type: 'DiscussionNote',
  body: '###  🦋  Changeset detected\n' +
    '\n' +
    'Latest commit: \n' +
    '\n' +
    '**The changes in this MR will be included in the next version bump.**\n' +
    '\n' +
    '<details><summary>This MR includes changesets to release 1 package</summary>\n' +
    '\n' +
    '  | Name         | Type  |\n' +
    '| ------------ | ----- |\n' +
    '| custom-theme | Patch |\n' +
    '\n' +
    '</details>\n' +
    '\n' +
    'Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/master/docs/adding-a-changeset.md).\n' +
    '\n' +
    "[Click here if you're a maintainer who wants to add another changeset to this MR](https://REDACTEDURL/REDACTEDREPOPATH/-/new/test/changesets-gitlab-new-version?file_name=.changeset/sixty-teams-warn.md&file=---%0A%0A---%0A%0ADraft%3A%20feat%3A%20update%20changesets-gitlab%0A)\n" +
    '\n' +
    '__Generated By Changesets GitLab Bot__',
  attachment: null,
  author: {
    id: 768,
    username: 'group_114_bot_HASH',
    name: '****',
    state: 'active',
    locked: false,
    avatar_url: 'GRAVATARURL',
    web_url: 'https://REDACTEDURL/group_114_bot_HASH'
  },
  created_at: '2023-12-19T10:57:54.212Z',
  updated_at: '2023-12-19T10:57:54.212Z',
  system: false,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: true,
  resolved: false,
  resolved_by: null,
  resolved_at: null,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495283,
  type: null,
  body: 'added 1 commit\n' +
    '\n' +
    '<ul><li>f2dc6603 - feat: debug even more</li></ul>\n' +
    '\n' +
    '[Compare with previous version](/REDACTEDREPOPATH/-/merge_requests/482/diffs?diff_id=291452&start_sha=e4876a4562f02af2f7e81aee6643bb744debeb23)',
  attachment: null,
  author: {
    id: 99,
    username: 'max.karkowski',
    name: 'Karkowski, Max',
    state: 'active',
    locked: false,
    avatar_url: 'https://secure.gravatar.com/avatar/ce5c37b052e79f9fa048081386068c91?s=80&d=identicon',
    web_url: 'https://REDACTEDURL/max.karkowski'
  },
  created_at: '2023-12-19T10:59:36.752Z',
  updated_at: '2023-12-19T10:59:36.757Z',
  system: true,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: false,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
note {
  id: 495285,
  type: null,
  body: 'added 1 commit\n' +
    '\n' +
    '<ul><li>443c7a4c - test: debug</li></ul>\n' +
    '\n' +
    '[Compare with previous version](/REDACTEDREPOPATH/-/merge_requests/482/diffs?diff_id=291458&start_sha=f2dc66035c4930cfa2c048cb3a09464f5f4eccc2)',
  attachment: null,
  author: {
    id: 99,
    username: 'max.karkowski',
    name: 'Karkowski, Max',
    state: 'active',
    locked: false,
    avatar_url: 'https://secure.gravatar.com/avatar/ce5c37b052e79f9fa048081386068c91?s=80&d=identicon',
    web_url: 'https://REDACTEDURL/max.karkowski'
  },
  created_at: '2023-12-19T11:05:31.451Z',
  updated_at: '2023-12-19T11:05:31.454Z',
  system: true,
  noteable_id: 52608,
  noteable_type: 'MergeRequest',
  project_id: 3136,
  resolvable: false,
  confidential: false,
  internal: false,
  noteable_iid: 482,
  commands_changes: {}
}
username group_114_bot2
random undefined
else block;
JounQin commented 10 months ago

group_114_bot_5c775e3447ee50f45b58355852330c78 vs group_114_bot2, I don't think we can handle it automatically, can you remove the env and try again?

maxkarkowski commented 10 months ago

so without a gitlab_user_name?

JounQin commented 10 months ago

yep

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