-
Notifications
You must be signed in to change notification settings - Fork 481
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
Gracefully handle creating milestone with existing name #4655
Gracefully handle creating milestone with existing name #4655
Conversation
This Pull Request targets Consider targeting |
TITLE: ${{github.event.milestone.title}} | ||
run: | | ||
MILESTONE_NUMBER=${TITLE:1} | ||
INCREMENTED_NUMBER=$((MILESTONE_NUMBER + 1)) | ||
echo "MILESTONE_NAME=M$INCREMENTED_NUMBER" >> $GITHUB_OUTPUT | ||
- name: Check if Milestone already exists | ||
id: checkIfMilestoneExists |
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.
Consider our discussions on steps naming in #4650 adjust your changes accordingly.
Fun fact: I thought about this approach as I reviewed your previous contribution. I ended up ditching it, as both have their merits. I do think this is cleaner and more robust though, so great to see we're taking this route now. |
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.
Let's test this in real life to verify it works.
5a0d5ca
to
bf14341
Compare
bf14341
to
d2a3444
Compare
I updated the naming according to our new convention and I am merging it as soon as CI passes |
related to #https://github.com/bpmn-io/internal-docs/issues/1052
Proposed Changes
Check if milestone exists before trying to create it to prevent the action from exiting with an error when trying to create a milestone which already exists (e.g. https://github.com/camunda/camunda-modeler/actions/runs/11625285084/job/32375114566)
Previous approach (done in #4639 ) turned out to not work as expected in GHA environment
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}