dcoapp / app

GitHub App that enforces the Developer Certificate of Origin (DCO) on Pull Requests
https://github.com/apps/dco
ISC License
297 stars 75 forks source link

Add option 'enable_pass' which can override making the 'Set DCO to pa… #120

Closed jmertic closed 8 months ago

jmertic commented 4 years ago

…ss' option for those with write access

Signed-off-by: John Mertic jmertic@linuxfoundation.org

jmertic commented 4 years ago

@hiimbex @brianwarner Can you take a look and see what else I need to do here?

brianwarner commented 4 years ago

Yep, sorry, been a little underwater these past few weeks :-) Let me get the tests in my big branch finished and PR'd, and I'll have a look at doing some tests for this.

gr2m commented 3 years ago

Hey @jmertic maybe I can help.

I don't see an associated issue for enable_pass and no documentation update in this PR, can you elaborate what it is for exactly? Is it to disable the "Set DCO to pass" check run action?

jmertic commented 3 years ago

Hey @gr2m - thanks for jumping in here.

Related issue is at https://github.com/probot/dco/issues/119. You are right that this is just to disable the "Set DCO to pass" check run action, as it makes the commit history paper trail hard to follow for DCO signoffs missed.

I'm happy to add any documentation or anything else needed to move this along.

gr2m commented 3 years ago

sounds good, thank you for the clarification.

Can you rebase your changes on the latest in master? Can you add the option to the README, and also add an integration test for the behavior so we won't break it in the future?

jmertic commented 3 years ago

Thanks - it's on my list. Will try to get this update in the next week or so.

fabianofernandeszup commented 3 years ago

Was this PR abandoned?

jmertic commented 3 years ago

It hasn't - I've just been swamped to have time and do this. Sounds like the main pieces are docs and tests, which I'll try to wrap up soon. Thanks for the reminder!

jmertic commented 3 years ago

@gr2m @hiimbex I've got this all done and documented, but I'm struggling on a test. Is there an example of how to create an option in the dco.yml file to test this?

hiimbex commented 3 years ago

there's 2 main tests in this repo and they have very different methodology.

The first uses github api mocks, so you'd mock the return of fetching the config files content from the github api (specifically this: https://developer.github.com/v3/repos/contents/#get-repository-content) - I think it uses https://github.com/probot/octokit-plugin-config now. Then you can basically verify whether or not the actions block was passed into the create check api call.

The second uses invocations of the getDCOStatus function with various arguments which your change doesnt really touch.

GitHub Developer
Contents
Get started with one of our guides, or jump straight into the API documentation.
GitHub
probot/octokit-plugin-config
Get/set persisted configuration using YAML/JSON files in repositories - probot/octokit-plugin-config
jmertic commented 3 years ago

@hiimbex - Thanks I will take a look at those examples for writing the test.

jmertic commented 3 years ago

@hiimbex Hey - still looking at this but being not a node person I'm having trouble wrapping my head around the test. Could you help perhaps?

stale[bot] commented 3 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?