Coder Social home page Coder Social logo

Comments (10)

zware avatar zware commented on August 27, 2024 9

It is possible to set the committer explicitly for a commit, using git -c "user.name=Your Name" -c "user.email=Your email", and to extract committer information from the cherry-picked commit. It's not exactly straightforward, but I think GitHub should preserve the committer and author of the commit rather than the pull request. Maybe.

from miss-islington.

berkerpeksag avatar berkerpeksag commented on August 27, 2024 1

IMO, the use of co-author feature is a workaround (better than nothing of course, thanks!) I will report this to GitHub so let's keep the issue open for a while.

from miss-islington.

Mariatta avatar Mariatta commented on August 27, 2024

We can't preserve it in squash merge. Rebase merge maybe.

from miss-islington.

Mariatta avatar Mariatta commented on August 27, 2024

When we do squash merge into a single commit, GitHub takes the info of the PR author, not the original committer.

If we allow rebase merge, I think we can do the git -c "user.name=Your Name" thing and the original author's info can be retained this way.

If the rebase merge is allowed, it will have to be enabled for all branches including master. And the core dev merging a PR needs to know that for backport PR, use rebase merge option, for master PRs, use the squash merge option.

from miss-islington.

berkerpeksag avatar berkerpeksag commented on August 27, 2024

By the way, I proposed allowing rebase merges when we discussed implementing a merge bot with @brettcannon and @Mariatta. They asked me to explain what exactly I'm proposing but I got sidetracked with other issues.

I can write a document and send it to core-workflow if you want to fix this issue.

from miss-islington.

Mariatta avatar Mariatta commented on August 27, 2024

GitHub just introduced Commit co-author feature. I'll investigate of how this can fit for miss-islington.
https://github.com/blog/2496-commit-together-with-co-authors

from miss-islington.

Mariatta avatar Mariatta commented on August 27, 2024

I tested the co-author feature in: python/cpython@6ea75b1

What do you all think about it? Would this be a good solution? I.e. having two co-authors to the commit?
I can code it such that the co-authored by footer is always added in backport PR.

from miss-islington.

Mariatta avatar Mariatta commented on August 27, 2024

Co-authored-by is now being added by default by miss-islington.
So I think it addressed your concern about preserving the author. The side effect is that they're sharing the credit with miss-islington.

Do you all think it's ok to close this issue now?

from miss-islington.

berkerpeksag avatar berkerpeksag commented on August 27, 2024

Just got a response from GitHub:

I can definitely understand how the ability to specify an author for a squashed PR merge might be useful. I've just added your +1 to that feature request internally. I can't say if or when a change will happen, but your feedback is in the right hands.

from miss-islington.

Mariatta avatar Mariatta commented on August 27, 2024

I consider this as won't fix, and closing the issue.
If GitHub will fix it soon, great, then there is nothing to do on our side.
If GitHub doesn't fix it, well, IMO the bot did make the PR, it can have the credit.
The co-authored by line is sufficient to me.

from miss-islington.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.