concourse / concourse/git-resource

Bug: tag_only: true should only push the specified tag, not all tags/branches

Open
#302 2 comments 3 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

In a pipeline with:

      - put: git-repo
        params:
          repository: git-repo
          tag: git-tag/tag.txt 
          tag_only: true 

You use the following command:

push_tags() {
  git push --tags push-target $forceflag
}

Which can result in trying to push all tags, and also push branches.

Instead you should push just the specific tag.
For example:

push_tags() {
  git push push-target $tag_name $forceflag
}

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 in assets/out around lines 105-107, where the tag_only push path calls push_tags. Trace how tag_name is set, then verify the change against the issue's example. Done means tag_only pushes only the specified tag and does not push other tags or branches.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.