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

Feature request: disable_forks parameter #66

Merged
merged 3 commits into from
Jan 13, 2019
Merged

Conversation

tlwr
Copy link
Contributor

@tlwr tlwr commented Jan 12, 2019

What

Implement the disable_forks parameter, which stops the resource from triggering if the pull request's repository is different from the resource's repository.

For more information search for isCrossRepository on GitHub's API documentation

Why

I would like to be able to configure the resource to only trigger on pull requests using branches rather than forks. This is so we can use GitHub's collaborator/team permissions instead of doing an author validation step in a task.

Pull request

  • Implements a test for this feature
  • Implements the feature
  • Updates the documentation in README.md

Other

This pull request does not implement an end to end test for this functionality, just a unit test. Personally I think that an end-to-end test would just be testing GitHub's implementation.

Please let me know if there is further work that you require before considering this feature.

Toby Lorne added 3 commits January 12, 2019 13:28
The resource should be able to ignore forks if configured to do so

This implements a test for this functionality and gets the tests into a
compiling but failing state
@tlwr tlwr requested a review from itsdalmo as a code owner January 12, 2019 13:44
Copy link
Contributor

@itsdalmo itsdalmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been requested as part of #58 as well! Thanks a lot 🎉

After merge it will be available under the dev tag, lets try it out and I can put together a release early next week 🙌

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

Successfully merging this pull request may close these issues.

2 participants