Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitlab: Properly forward author details #9188

Merged
merged 6 commits into from
Apr 10, 2024

Conversation

ylecuyer
Copy link
Contributor

@ylecuyer ylecuyer commented Mar 3, 2024

Hello, the author details isn't forwarded to the create_commit call to gitlab api, thus the created commit is authored with the account linked to the token:

Set up with:

author_details = {
     name: "Dependabot",
     email: "no-reply@example.com"
}

Before:

ylecuyer@inwin:/tmp/test-dependabot$ git log
commit b48fab5c9f967a0b00a11212d45a1117b4c4fa35 (HEAD -> dependabot/bundler/nokogiri-1.16.2, origin/dependabot/bundler/nokogiri-1.16.2)
Author: Yoann Lecuyer <y****.com>
Date:   Sun Mar 3 15:35:03 2024 +0000

    Auto: Bump nokogiri from 1.16.0 to 1.16.2. By DEPENDABOT

After:

ylecuyer@inwin:/tmp/test-dependabot$ git log
commit b03937ea5e32243c3f7e6ed2540b6cd22535d0fc (HEAD -> dependabot/bundler/nokogiri-1.16.2, origin/dependabot/bundler/nokogiri-1.16.2)
Author: Dependabot <no-reply@example.com>
Date:   Sun Mar 3 15:31:57 2024 +0000

    Auto: Bump nokogiri from 1.16.0 to 1.16.2. By DEPENDABOT

@ylecuyer ylecuyer requested a review from a team as a code owner March 3, 2024 15:56
Copy link
Member

@Nishnha Nishnha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I checked if we are missing any other options but it seems like those are the only ones: https://www.rubydoc.info/gems/gitlab/Gitlab/Client/Commits#create_commit-instance_method

I also checked if we are passing the author details to the other non-GitHub clients and it looks like we are only missing it here

@Nishnha Nishnha enabled auto-merge (squash) April 10, 2024 21:40
@Nishnha Nishnha merged commit 69124b0 into dependabot:main Apr 10, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants