Skip to content

Support blob/regex pattern for branch names #398

@markdboyd

Description

@markdboyd

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

Activity

markdboyd

markdboyd commented on Mar 17, 2023

@markdboyd
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @markdboyd

      Issue actions

        Support blob/regex pattern for branch names · Issue #398 · concourse/git-resource