Comments (14)
Ok that makes sense, I was able work around this by amending the author on my commit.
I'll leave this issue open since it sounds like there's some discussion to take place. Thanks again @hiimbex 😄
from app.
Hiya! Just commented in envoyproxy/envoy#1743 (comment) but basically, as long as the git config is set to the correct email, say email a. As long as the commit is signed with email a, the bot should correctly approve the commit.
from app.
Hey, thanks for the quick response!
git config --global -l
user.name=bndw
[email protected]
I just rebased, signed with that account, and force pushed envoyproxy/envoy@75c2374 to envoyproxy/envoy#1768, but it's still reporting:
DCO — Expected "bndw <[email protected]>", but got "bndw <[email protected]>"
Anything else to try?
from app.
Ah, you're completely right, I was able to recreate this here: probot/test#24. This is definitely an issue on our end.
This is not behavior I expect, but it appears to be due to our use of the GitHub API here: https://developer.github.com/v3/repos/commits/#compare-two-commits
The API call we're using has this data:
"commit": {
"author": {
"name": "Monalisa Octocat",
"email": "[email protected]",
"date": "2011-04-14T16:00:49Z"
},
"committer": {
"name": "Monalisa Octocat",
"email": "[email protected]",
"date": "2011-04-14T16:00:49Z"
}
}
We do our checks using commit.author.email
:
https://github.com/probot/dco/blob/3e486021f8333df5c957e9b12c53bca1d9c7ba5f/lib/dco.js#L30-L35
When you rebase, the committer email is probably the one that gets updated, and I think it should be the one we use. So, I think on our end we should swap to commit.comitter.email
. Thoughts @bkeepers ?
from app.
Nice find! Another test potentially worth running would be to specify the author
on the rebased commit and see if that updates the check?
But using commit.comitter.email
makes sense to me.
from app.
Another test potentially worth running would be to specify the author on the rebased commit and see if that updates the check?
It would be my suspicion that that would work! Not super familiar with all the rebase options, so I didn't even realize you could update the author 🙇 let me know if that works!
from app.
Just tried this but it didn't appear to update the check. In my commit message, I specified the following but it's still using the old author:
My commit message
Signed-off-by: bndw <[email protected]>
Author: bndw <[email protected]>
from app.
Hmm I believe it's because you need to use git commit --amend --author="Author Name <[email protected]>"
after an interactive rebase (not my strong suit lol). But this worked here: probot/test#24 for me. I did git rebase -i my_commit
and then added x git commit --amend --author="Author Name <[email protected]>"
at the top and saved and force pushed.
from app.
Excellent, this workaround should unblock the linked PR!
Just to be clear, the steps to change the author were:
- interactive rebase
- In the commit message, add this line to the top, above the message?
x git commit --amend --author="Author Name <[email protected]>"
from app.
Yes! To clarify, the x
in interactive rebased represents exec
, so I did this through vim (not in the commit message itself) and deleted the first line which was noop
and replaced it with x git commit --amend --author="Author Name <[email protected]>"
and upon saving that and then force pushing, that updated the author for me.
For the purposes of the future, I'm somewhat unsure of whether the DCO should be based on the author or the committer, so I'd be open to input from some of the linux folks who use the bot on what they think.
from app.
So, I think on our end we should swap to
commit.comitter.email
. Thoughts @bkeepers ?
👍 Great catch! Sounds good to me.
from app.
Is this still relevant? If so, please comment with any updates or addition details.
from app.
Looks like people are still hitting this issue, but I'm not able to allocate anymore time to it.
from app.
🎉 This issue has been resolved in version 1.0.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
from app.
Related Issues (20)
- Correct looking Signoff not recognised HOT 4
- Disabling "sign-off" for members doesn't work, instead requires GPG signatures HOT 3
- DCO rejects commits because it's not my user handle (new!) HOT 1
- move repository out of @probot HOT 3
- DCO Expected — Waiting for status to be reported HOT 28
- Provide a template repo, or document how to set one up
- All of a sudden DCO App not running in any repos in org HOT 2
- Adding a web link to remediate commits that are not signed off HOT 10
- Allow single repositories to be excluded via config HOT 7
- Use as "pre-commit" hook? HOT 3
- Feature request: Option to ignore certain accounts
- DCO signed off failing for one of PR (commit) HOT 3
- Committing a suggested change in github is not signed. HOT 3
- Validation problem over UTF-8 encoding
- Better output format for commits?
- [suggestion] support quick script
- [bug] DCO passes when Squashed commit contains no sign-off
- Enforce signing with a GitHub-verified e-mail
- dco app doesn't run in merge queues HOT 3
- DCO app does not verify that Signed-off-by email address matches the commit author's email address
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app.