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?
-
CHANGELOG entry added - Will do after this has been reviewed
-
Documentation created/updated - Updated the File API doc
-
API support added - This MR adds an optional param to the Files API requests
- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together
Merge request reports
Activity
Added 462 commits:
-
abe1a505...30091edf - 460 commits from branch
gitlab-org:master
- b44cbd7b - Add support for passing the author when creating dirs, updating files, and removing files
- f473ecc1 - Merge branch 'master' of https://gitlab.com/dandunckelman/gitlab-ce into add_opt…
-
abe1a505...30091edf - 460 commits from branch
Marked the task Documentation created/updated as completed
Marked the task Conform by the style guides as completed
Added 30 commits:
-
71acc339...59fa031e - 29 commits from branch
gitlab-org:master
- ce7fe366 - Add optional 'author' param when making commits
-
71acc339...59fa031e - 29 commits from branch
Added 1 commit:
- a654e604 - Refactor to use 'get_commit_options' and rename the 'user_to_author' method to 'get_author'
Added 14 commits:
-
a654e604...9e7231bd - 13 commits from branch
gitlab-org:master
- 7d3a1e9c - Add optional 'author' param when making commits
-
a654e604...9e7231bd - 13 commits from branch
Added 7 commits:
-
7d3a1e9c...31570c12 - 6 commits from branch
gitlab-org:master
- 3499fdd5 - Add optional 'author' param when making commits
-
7d3a1e9c...31570c12 - 6 commits from branch
Marked the task Squashed related commits together as completed
mentioned in issue #21066 (closed)
Added 291 commits:
-
3499fdd5...cd102716 - 290 commits from branch
gitlab-org:master
- cd1ccb92 - Add optional 'author' param when making commits
-
3499fdd5...cd102716 - 290 commits from branch
mentioned in issue #21107 (closed)
@smcgivern I saw you added some labels. Just wanted to mention that I saw the build passed and see if I could get some attention on this.
Could you or someone else take a look and provide some feedback? Thanks
@dandunckelman you couldn't see it, but I'd also added a todo!
Looking now.- Resolved by username-removed-393947
- Resolved by username-removed-393947
- Resolved by username-removed-393947
- Resolved by username-removed-393947
- Resolved by username-removed-393947
- Resolved by username-removed-393947
- Resolved by username-removed-393947
- Resolved by username-removed-393947
- Resolved by username-removed-393947
- Resolved by username-removed-393947
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
Added 150 commits:
-
cd1ccb92...5c7bca33 - 149 commits from branch
gitlab-org:master
- 721112e2 - Add optional 'author' param when making commits
-
cd1ccb92...5c7bca33 - 149 commits from branch
Marked the task CHANGELOG entry added as completed
Added 6 commits:
-
721112e2...f41098ad - 5 commits from branch
gitlab-org:master
- 25592d6b - Add optional 'author' param when making commits
-
721112e2...f41098ad - 5 commits from branch
- Resolved by username-removed-393947
Added 39 commits:
-
25592d6b...02591b04 - 38 commits from branch
gitlab-org:master
- 6502307b - Add optional 'author' param when making commits
-
25592d6b...02591b04 - 38 commits from branch
Added 1 commit:
- 53b7b7df - Add optional 'author' param when making commits
Added 1 commit:
- 1a5d27bc - Add optional 'author' param when making commits
- Resolved by username-removed-393947
- Resolved by username-removed-393947
- Resolved by username-removed-393947
@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:
-
1a5d27bc...7dd97cff - 382 commits from branch
gitlab-org:master
- eeb2aec6 - Add optional 'author' param when making commits
-
1a5d27bc...7dd97cff - 382 commits from branch
Added 1 commit:
- 36977f30 - Add optional 'author' param when making commits