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

Skip check for commits from bots #21

Closed
bkeepers opened this issue Sep 1, 2017 · 6 comments · Fixed by #59
Closed

Skip check for commits from bots #21

bkeepers opened this issue Sep 1, 2017 · 6 comments · Fixed by #59
Labels

Comments

@bkeepers
Copy link
Contributor

bkeepers commented Sep 1, 2017

#20 has a commit from a bot, which fails the DCO check. Any commit where the author name includes [bot] should be ignored.

@hiimbex
Copy link
Contributor

hiimbex commented Sep 1, 2017

Also similar scenario where the bot is an OAuth actor? I assume the problem would be the same there.

cc/ @tbarn

@tunnckoCore
Copy link

Hm. Good point.

@tunnckoCore
Copy link

tunnckoCore commented Sep 7, 2017

I think one check in lib/dco.js for

(commit.author.type === 'Bot' && commit.author.login.endsWith('[bot]')) ||
commit.commiter.type === 'Bot' 

would be enough?

refs:
https://api.github.com/repos/tunnckoCore/parse-function/pulls/49
https://api.github.com/repos/tunnckoCore/parse-function/pulls/49/commits

Be aware of that, when Web UI is used, the commit.commiter.login is web-flow, so most guaranteed is commit.author.

@hiimbex
Copy link
Contributor

hiimbex commented Sep 8, 2017

sounds about right to me! Wanna open a PR for that @charlike?

@tunnckoCore
Copy link

Yea, i'll give it a shot when have a bit more time :)

@stale
Copy link

stale bot commented Apr 5, 2018

Is this still relevant? If so, please comment with any updates or addition details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants