Skip to content
This repository was archived by the owner on Apr 4, 2018. It is now read-only.

[#130188061] Add ability to disallow pull requests from forks #1

Merged
merged 3 commits into from
Nov 23, 2016

Conversation

henrytk
Copy link

@henrytk henrytk commented Nov 22, 2016

What

#130188061 - Migrate existing AWS-RDS bosh release builds to use pullrequest-resource based builds

In some cases you may want to only allow pull requests from within your own team. This is useful in scenarios where you cannot have untrusted code being pulled into your Concourse pipeline.

This commit adds the ability to optionally set a disallow_forks configuration, which if set to true will only consider pull requests valid if they are raised from within the same repository. The value of this configuration is false by default and does not interfere with the normal behaviour of the resource.

How to review

Review as part of alphagov/paas-release-ci#1

Also:

  • Run the rspec tests: bundle install && bundle exec rspec
  • Code review

Who

Anyone but me or @alext

@henrytk henrytk changed the title [#130188061] Add ability to disallow pull requests from forks WIP: [#130188061] Add ability to disallow pull requests from forks Nov 22, 2016
@henrytk henrytk changed the base branch from master to gds_master November 22, 2016 11:41
@henrytk henrytk force-pushed the disallow_forks branch 3 times, most recently from 1875238 to 2531eb2 Compare November 22, 2016 13:59
This makes it consistent with the rest of the methods in this class, and
makes it easier to add additional arguments.
In some cases you may want to only allow pull requests from within
your own team. This is useful in scenarios where you cannot have
untrusted code being pulled into your Concourse pipeline.

This commit adds the ability to optionally set a `disallow_forks`
configuration, which if set to true will only consider pull requests
valid if they are raised from within the same repository. The value
of this configuration is false by default and does not interfere
with the normal behaviour of the resource.
@henrytk henrytk changed the title WIP: [#130188061] Add ability to disallow pull requests from forks [#130188061] Add ability to disallow pull requests from forks Nov 22, 2016
henrytk added a commit to alphagov/paas-release-ci that referenced this pull request Nov 23, 2016
We can remove this commit once our pull request[1] has been accepted
and the new Docker image has been built from `gds_master`

[1] alphagov/paas-pullrequest-resource#1
@henrytk henrytk changed the title [#130188061] Add ability to disallow pull requests from forks WIP: [#130188061] Add ability to disallow pull requests from forks Nov 23, 2016
alext pushed a commit to alphagov/paas-release-ci that referenced this pull request Nov 23, 2016
We can remove this commit once our pull request[1] has been accepted
and the new Docker image has been built from `gds_master`

[1] alphagov/paas-pullrequest-resource#1
henrytk added a commit to alphagov/paas-release-ci that referenced this pull request Nov 23, 2016
We can remove this commit once our pull request[1] has been accepted
and the new Docker image has been built from `gds_master`

[1] alphagov/paas-pullrequest-resource#1
alext pushed a commit to alphagov/paas-release-ci that referenced this pull request Nov 23, 2016
We can remove this commit once our pull request[1] has been accepted
and the new Docker image has been built from `gds_master`

[1] alphagov/paas-pullrequest-resource#1
alext pushed a commit to alphagov/paas-release-ci that referenced this pull request Nov 23, 2016
We can remove this commit once our pull request[1] has been accepted
and the new Docker image has been built from `gds_master`

[1] alphagov/paas-pullrequest-resource#1
alext pushed a commit to alphagov/paas-release-ci that referenced this pull request Nov 23, 2016
We can remove this commit once our pull request[1] has been accepted
and the new Docker image has been built from `gds_master`

[1] alphagov/paas-pullrequest-resource#1
alext pushed a commit to alphagov/paas-release-ci that referenced this pull request Nov 23, 2016
We can remove this commit once our pull request[1] has been accepted
and the new Docker image has been built from `gds_master`

[1] alphagov/paas-pullrequest-resource#1
alext pushed a commit to alphagov/paas-release-ci that referenced this pull request Nov 23, 2016
We can remove this commit once our pull request[1] has been accepted
and the new Docker image has been built from `gds_master`

[1] alphagov/paas-pullrequest-resource#1
@alext
Copy link

alext commented Nov 23, 2016

@jtarchie Thanks for the feedback, that all sounds good. We intended to run this internally for a little bit to verify the behaviour before raising a PR against your repo (that's what this PR is for).

@alext alext changed the title WIP: [#130188061] Add ability to disallow pull requests from forks [#130188061] Add ability to disallow pull requests from forks Nov 23, 2016
@benhyland benhyland self-assigned this Nov 23, 2016
@benhyland
Copy link

This looks fine. I added a minor tweak to get tests passing in my environment. I'll merge.

@benhyland benhyland merged commit cc295ae into gds_master Nov 23, 2016
@benhyland benhyland deleted the disallow_forks branch November 23, 2016 18:06
@alext
Copy link

alext commented Nov 24, 2016

@benhyland What was the issue you were hitting? It would have been good to explain that in the commit message.

@benhyland
Copy link

Sourcing the common.sh file ensures that the default TMPDIR value is set in case it is not specified by the environment. Without it mktemp can fail.

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

Successfully merging this pull request may close these issues.

4 participants