git-resource icon indicating copy to clipboard operation
git-resource copied to clipboard

Support blob/regex pattern for branch names

Open markdboyd opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

I would like to use the Github merge queue feature to manage Dependabot PRs, among other things. But in order to have Concourse CI jobs triggered by the merge queue builds, I need to be able to match against PRs by a blob/regex pattern: gh-readonly-queue/{base_branch}/.

From what I can tell from the documentation and perusing the check script code, the branch option currently only supports a static branch name.

Describe the solution you'd like

I'd like to add a name option for check, branch_pattern, to support dynamically matching against branch names by a blob pattern

Then it could be used like so when declaring a resource in a pipeline:

- name: merge-queue-builds
  type: git
  source:
    uri: https://github.com/concourse/git-resource
    branch_pattern: gh-readonly-queue/main/*

And then CI jobs in the pipeline could be triggered by this resource.

Describe alternatives you've considered

No response

Additional context

No response

markdboyd avatar Mar 17 '23 20:03 markdboyd

I have a naive PR started: #399. I was having difficulty getting the tests to run well locally though

markdboyd avatar Mar 17 '23 21:03 markdboyd