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

Document the provided metadata, and related migration to perform #274

Closed
wants to merge 26 commits into from

Conversation

bgandon
Copy link

@bgandon bgandon commented Feb 2, 2022

Hello Telia folks,
In this PR, I've documented the metadata that is provided, and how to migrate from jtarchie/github-pullrequest when it comes to handling metadata.
Best

duanemay and others added 26 commits July 19, 2022 18:57
Signed-off-by: Ben Fuller <benjaminf@vmware.com>
Co-authored-by: Ben Fuller <benjaminf@vmware.com>
This resource can inadvertently miss Pull Requests due to out-of-order
commits across PRs.  If PR#2 is opened after PR#1, but the head commit
of PR#2 is older than the head commit of PR#1, the resource will not
include PR#2 in the list of new versions provided to Concourse.

Rather than attempt to find a different way of tracking which PRs are
"new" given an input version, we can remove the date-based filtering
and return all open PRs.  Concourse can deduplicate versions based on
metadata, which means that we will only trigger new jobs for versions
that Concourse hasn't seen before.

This makes it easier for teams to use this resource to track PRs in
Concourse, since they no longer have to ensure that a PR has a later
head commit than all currently-opened PRs in order to notify Concourse
that their PR exists.
This triggers CI when the approved review count changes, which is not
the correct behaviour

Co-authored-by: Kieron Browne <kbrowne@vmware.com>
This allows finer control of the RequiredReviewApprovals property. It is
ignored if the user is in one of the trusted teams, or in the trusted
user list.

This way we can run CI on trusted users without needing an approval, but
untrusted users will require a PR approval before their changes are run
in CI.

In order to reduce the number of calls to github we are caching trusted
users for the duration of a single check.

Note: github should be configured to remove approvals if new commits are
received on a PR so that a user doesn't circumvent security by pushing a
malicious commit after an approved legitimate commit on the same PR.

Co-authored-by: Kieron Browne <kbrowne@vmware.com>
Co-authored-by: Georgi Sabev <georgethebeatle@gmail.com>
Co-authored-by: Danail Branekov <danailster@gmail.com>
Add details on `trusted_teams` and `trusted_users` source configuration parameters.

Co-authored-by: Danail Branekov <danailster@gmail.com>
Co-authored-by: Georgi Sabev <georgethebeatle@gmail.com>
`trusted_teams`/`trusted_users` + various fixes
@bgandon
Copy link
Author

bgandon commented Feb 5, 2024

Closing in favor of cloudfoundry-community#5

@bgandon bgandon closed this Feb 5, 2024
@bgandon bgandon deleted the document-metadata branch February 5, 2024 23:49
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.

None yet

7 participants