You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: "Remove agent credits when merging" does nothing for GitLab merge requests #30440
Turn on Settings, Source control, "Remove agent credits when merging".
Have a GitLab project whose merge or squash commit template carries agent credits. On TonybynMp4/git-ansible I set the merge template to Merge branch '%{source_branch}' into '%{target_branch}', a blank line, %{title}, %{description}, See merge request %{reference}, and the squash template to %{title} plus %{all_commits}. The project squashes on every merge.
Open a merge request whose description ends in Claude Code's "🤖 Generated with Claude Code" footer and whose commit has Co-authored-by: Claude <noreply@anthropic.com> and a human co-author. !7 is that fixture.
Merge it from T3 Code.
Expected behavior
The merge and squash commits lose the footer and the Claude trailer and keep the human co-author, as they do for GitHub pull requests.
Actual behavior
Both commits keep every credit:
PullRequestService only passes removeAgentCreditsOnMerge to a provider that sets api.mergeMessageRewrite. The GitLab provider doesn't set it, and glab mr merge was never given a message, so GitLab writes its own from the templates.
Impact
Teams that turned the setting on to keep agent credits out of main get them on every GitLab merge, and nothing in the app says the setting was skipped.
Version or commit
7c22e24e3f (main)
Environment
Linux, web dev build, gitlab.com through glab 1.128.0.
Screenshots, recordings, or supporting files
Workaround
Merge on GitLab and edit the messages by hand, or drop %{description} and %{all_commits} from the templates.
Activity