concourse / concourse/git-resource

tag_regex: inverse match

Open
#349 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi!
Currently i am facing the task of triggering a build pipeline when only for commits that don't match some tag regex.
I want to exclude in my staging environment everything that does not match .*[0-9]+.[0-9]+.[0-9]+.*
Basically the check uses somethign like this:
git tag --list --sort=creatordate | grep -Ex ${regex}
In my special case i would use invert matching using grep -v
e.g. git tag --list --sort=creatordate | grep -Exv ".*[0-9]+.[0-9]+.[0-9]+.*"

My proposal: a bool tag_regex_invertthat would enable the -v option for the grep commands using tag_regex.

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

Locate the tag_regex handling and the grep commands in the git resource, then trace how resource configuration reaches that check. Done means a tag_regex_invert option enables inverse matching for those commands while the existing behavior remains unchanged; add or update the relevant tests if the project has coverage there.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.