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

github-pr-resource retroactively builds for PRs that have already been merged #260

Open
patmaddox opened this issue May 25, 2021 · 1 comment

Comments

@patmaddox
Copy link

Most likely I'm just misunderstanding how this specific resource works, or concourse resources work in general. But here's what I'm seeing:

I created a pipeline to run tests for PRs. I opened a PR, it ran the tests, I merged the PR. Then I added a new job to the pipeline - and Concourse ran that job on the "open" version of the PR, even though the PR had already been merged.

Also, when looking at the resource in the Concourse UI, I see all the previous versions, and they appear to be OPEN even though viewing the metadata shows the state as MERGED.

So my questions:

  1. How do I ensure that if I add a job, it doesn't get run for old versions of a PR that have already been closed?
  2. Is there away to automatically clear out the PR versions once they've been merged? (is that necessary / useful?)
@bgandon
Copy link

bgandon commented May 10, 2024

With year of experience, I can tell you for sure that this resource executes jobs on "open" PRs only. You might have misunderstood what you've seen in the Concourse UI.

Anyway, recent news is that the Cloud Foundry community is now maintaining a fork of this resource at cloudfoundry-community/github-pr-resource.

On our Concourse installation at Gstack, that one is working fine. You may be interested in giving a try!

(the new resource is a drop-in replacement; you only have to switch telia-ossto cfcommunity in in the resource_types: declaration, i.e. specify repository: cfcommunity/github-pr-resource)

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

No branches or pull requests

2 participants