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

AAE-23095 Branch name length strategy #641

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

wojciech-piotrowiak
Copy link
Contributor

Checklist

  • Jira Reference (also in PR title):
  • README updated after adding/changing behaviour of an action
  • Proposed version increment for release:
    • Patch (bugfix)
    • Minor (new feature)
    • Major (breaking changes)
  • External PR link where changes has been tested:

Description

Some branch names are too long, which causes tag name longer than maximum 128 characters

@wojciech-piotrowiak wojciech-piotrowiak self-assigned this Jun 11, 2024
@wojciech-piotrowiak wojciech-piotrowiak requested a review from a team as a code owner June 11, 2024 08:28
@@ -75,6 +75,7 @@ runs:
run: |
REPOSITORY=${DIR##*/}
TAG="${TAG:-$(echo ${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} | sed -e 's/[^-_.[:alnum:]]/_/g')}"
TAG="${TAG:0:128}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: if the tag originally comes from the action input, I don't think we should modify it, and let it fail if it's too long.
For the fallback tag (second part of expression 1 line above), we can cut it, but I wonder if we need to use the branch name on PRs, maybe relying on GITHUB_REF_NAME for all use cases is better ("<pr_number>/merge" would be the value on PRs)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, set limitation only on generated value

@wojciech-piotrowiak wojciech-piotrowiak merged commit d40c910 into master Jun 11, 2024
3 checks passed
@wojciech-piotrowiak wojciech-piotrowiak deleted the feature/AAE-23095-branch-name-strategy branch June 11, 2024 09:52
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