Skip to content
Snippets Groups Projects

Add optional 'author' param when making commits

What does this MR do?

This fulfills https://gitlab.com/gitlab-org/gitlab-ce/issues/20789 by adding the ability to specify a user's ID to be used as the author of a commit.

Why was this MR needed?

To fulfill https://gitlab.com/gitlab-org/gitlab-ce/issues/20789

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/20789

Does this MR meet the acceptance criteria?

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Thanks @dandunckelman, this looks great so far! I know I have a bunch of comments up there but they are mostly stylistic rather than a problem with the overall approach.

    If there isn't a CHANGELOG section for 8.12 by the time you look at this again, please add it and add this MR to it, crediting yourself :tada:

  • Just finished walking thru the comments and will get crackin' on the list of changes now. Shouldn't take long.

    Thanks for all the help.

  • Added 150 commits:

  • username-removed-393947 Marked the task CHANGELOG entry added as completed

    Marked the task CHANGELOG entry added as completed

  • Added 6 commits:

  • Added 39 commits:

  • Added 1 commit:

    • 53b7b7df - Add optional 'author' param when making commits
  • Added 1 commit:

    • 1a5d27bc - Add optional 'author' param when making commits
  • @dandunckelman this is coming along very nicely! Sorry for all the back and forth but I definitely think this is getting there.

  • (Poking my head in because I got mentioned.)

    I am trying to wrap my head around what we are trying to do here. Reading https://gitlab.com/gitlab-org/gitlab-ce/issues/20147#note_13619126 it sounds like this is about creating commits on behalf of 'guest' users.

    What I don't understand is why we have to use GitLab user ID's. I see complicated stuff regarding questions like 'does the guest user have access to the project'.

    The way Git works, you can already push commits with anything / anyone you want as the author; it is just a string in the commit metadata. If the new API thingy used an author string we would not have to introduce a new capability to the 'guest' access level (namely the capability to have commits authored on your behalf pushed into the repository by someone else). Wouldn't that be simpler?

    I realize I am butting in in the middle of things here but I thought I should ask.

  • @jacobvosmaer-gitlab that makes sense to me! @dandunckelman would that work for you?

  • @smcgivern @jacobvosmaer-gitlab I'm all for keeping complexity low.

    So, how about I rework it so the API takes in an author name and email?

  • Added 383 commits:

  • Added 1 commit:

    • 36977f30 - Add optional 'author' param when making commits
  • Please register or sign in to reply
    Loading