-
Notifications
You must be signed in to change notification settings - Fork 48
Add release prefix #4680
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
Add release prefix #4680
Conversation
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR enhances the GitHub Actions tag_release workflow to derive an application-specific prefix from the branch name and embed it into the release tag format. Flow diagram for release tag generation with app prefixflowchart TD
Start([Start]) --> GetBranch["Get branch name from env.BRANCH"]
GetBranch --> DerivePrefix["Derive APP_PREFIX by splitting branch name"]
DerivePrefix --> CheckPrevRelease["Check previous release tag"]
CheckPrevRelease --> SetMinorVersion["Set MINOR_VERSION"]
SetMinorVersion --> FormatTag["Format tag as r-APP_PREFIX.DATE.MINOR_VERSION"]
FormatTag --> CreateTag["Create annotated git tag"]
CreateTag --> End([End])
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `.github/workflows/tag_release.yml:26` </location>
<code_context>
DATE=$(date +"%Y.%m.%d")
PREV_RELEASE=$(git tag --list | tail -1)
MINOR_VERSION=0
+ APP_PREFIX=${{ env.BRANCH }} | cut -d'-' -f2
case $PREV_RELEASE in
*"$DATE"*)
</code_context>
<issue_to_address>
**issue (bug_risk):** Shell variable assignment syntax is incorrect for piping and command substitution.
Use command substitution to ensure the pipe operates within the assignment: APP_PREFIX=$(echo "${{ env.BRANCH }}" | cut -d'-' -f2).
</issue_to_address>
### Comment 2
<location> `.github/workflows/tag_release.yml:36` </location>
<code_context>
;;
esac
- TAG="r.$DATE.$MINOR_VERSION"
+ TAG="r-$APP_PREFIX.$DATE.$MINOR_VERSION"
git config --local user.email "[email protected]"
git config --local user.name "Cost Management Release Action"
</code_context>
<issue_to_address>
**suggestion:** TAG format now includes APP_PREFIX, which may be empty if extraction fails.
Add a validation step to ensure APP_PREFIX is not empty before constructing the tag.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4680 +/- ##
=======================================
Coverage 87.07% 87.07%
=======================================
Files 480 480
Lines 9078 9078
Branches 2197 2194 -3
=======================================
Hits 7905 7905
+ Misses 1108 1107 -1
- Partials 65 66 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds a prefix to help identify tags for each app.
Summary by Sourcery
CI: