Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Functionality for Detecting Creation of 'release/*' branch #5

Open
michaelpitts opened this issue Oct 4, 2019 · 1 comment
Open

Comments

@michaelpitts
Copy link

Hello!! this is an awesome project and it's great to have a smart workaround for the short comings of AWS Codepipeline.

Feel free to close this issue if the code already supports this workflow, but I am looking for something specific:
My company has decided on Gitflow, which requires the creation of 'release candidate' branches when code from 'develop' is deemed ready for release. Currently, I have to hardcode the release candidate branches name into our pipelines, which isn't ideal and will not scale well. I was hoping that AWS Codepipeline would support a wildcard feature where I can target for any branch that starts with 'release/', but of course, AWS doesn't support this.
Is it possible to implement a feature into this that looks for any new branch created that matches a certain regex pattern? (as opposed to any new PRs)

Thank you!!

@nicolai86
Copy link
Owner

nicolai86 commented Jun 6, 2020

Per github documentation there is an event emitted when a branch is pushed. In that case you'd need to include this event in main.go.

The basic structure should look like

if payload.Header["X-GitHub-Event"] == "push" {
 // check ref if this is a release/* branch
} else if // existing logic

If you end up implementing this feel free to open a PR to extend this tool :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants