Skip to content

Add the ability to push to refs other than refs/heads#371

Merged
taylorsilva merged 3 commits intoconcourse:masterfrom
jamie-pate:master
Sep 2, 2021
Merged

Add the ability to push to refs other than refs/heads#371
taylorsilva merged 3 commits intoconcourse:masterfrom
jamie-pate:master

Conversation

@jamie-pate
Copy link
Contributor

Some workflows do not follow the default git reference conventions, rarely you may want to e.g. create a review in gerrit, which requires a push to refs/for/branch where you would normally push to refs/heads/branch.

See https://gerrit-review.googlesource.com/Documentation/user-upload.html#_git_push

Normal branches all exist in refs/heads but some git workflows require
pushing to a different type of reference.

For example Gerrit Reviews are created/updated by pushing to a 'magic'
ref at `refs/for/<branch>`

Signed-off-by: Jamie Pate <jpate@fortinet.com>
@jamie-pate
Copy link
Contributor Author

jamie-pate commented Sep 2, 2021

unfortuately the get step then fails with

fatal: reference is not a tree: 6c8f542428b6d81e7a52027539cedc4639476de7

where 6c8f542428b6d81e7a52027539cedc4639476de7 is the commit that was pushed...

This may not be as useful for creating gerrit reviews as I expected.. I think I might need to make a custom resource type that supports gerrit reviews directly..

Copy link
Member

@taylorsilva taylorsilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - not sure what other worklfows this supports, but maybe someone will find it useful :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants