Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing slashes in branch names #1281

Merged
merged 2 commits into from May 31, 2022
Merged

Allowing slashes in branch names #1281

merged 2 commits into from May 31, 2022

Conversation

OJPARKINSON
Copy link
Contributor

I'm currently running into a few issues with branch names that include a slash like feature/branch-name. So this means that CODEBUILD_WEBHOOK_TRIGGER will look like branch/feature/branch-name and danger then splits the string into an array and looks for the second index('feature'). This misses the rest of the name meaning that the PR cannot be found and Danger errors out.

To combat this I've swapped out the split to arrays and seen as we know what the ENVs will be formatted we can just check the start of the strings and then replace the part we don't want.

Copy link
Member

@fbartho fbartho left a comment

Choose a reason for hiding this comment

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

This seems reasonable to me, however I’ve never used codebuild, so take that with a grain of salt!

@orta
Copy link
Member

orta commented May 31, 2022

Agree, looks good to me too

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

Successfully merging this pull request may close these issues.

None yet

3 participants