concourse / concourse/git-resource

Support blob/regex pattern for branch names

Open
#398 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Shell
Stars
203
Forks
305
Avg merge
11d 14h
Merged PRs (30d)
2

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the documentation and the check script referenced in the issue to understand how the current static branch option is handled. Add support for a branch_pattern resource option that matches dynamically named branches such as gh-readonly-queue/main/*, and verify that matching branches can trigger the resource.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
ci-cd
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.