Skip to content

Conversation

@blink1073 blink1073 requested a review from alcaeus June 10, 2024 16:06
Comment on lines 41 to 46
if [ ${{ inputs.dry_run }} != "true" ]; then
git push origin
echo "### Version bump: ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY
else
echo "### Version bump : ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY
fi No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be simplified if you want to print the same message in both cases:

Suggested change
if [ ${{ inputs.dry_run }} != "true" ]; then
git push origin
echo "### Version bump: ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY
else
echo "### Version bump : ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY
fi
if [ ${{ inputs.dry_run }} != "true" ]; then
git push origin
fi
echo "### Version bump: ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY

Alternatively, consider using a different message here as you've done in the tag-version action.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

Comment on lines 13 to 15
dry_run:
description: Whether this is a dry run
required: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about naming this push_commit since that's what it does?

Context: in the PHP repositories, I don't want to push right away since we merge the changes to another branch so our merge-up automation doesn't pick up these changes (as they would conflict anyways)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

tag_message_template:
description: The template for the git tag message
default: "BUMP ${VERSION}"
dry_run:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar to the above, how about naming this push_tag?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@blink1073 blink1073 requested a review from alcaeus June 10, 2024 17:55
- name: Push the commit to the source branch
shell: bash -eux {0}
run: |
if [ ${{ inputs.push_commit }} != "true" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

The logic is backwards, resulting in a push when push_commit is set to false ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

- name: Push the tag to the source branch
shell: bash -eux {0}
run: |
if [ ${{ inputs.push_tag }} != "true" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here - the check needs to change

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

@blink1073 blink1073 requested a review from alcaeus June 11, 2024 10:58
Copy link
Collaborator

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

Missed two docs changes in my last review, but LGTM other than that.

blink1073 and others added 4 commits June 11, 2024 09:28
Co-authored-by: Andreas Braun <git@alcaeus.org>
Co-authored-by: Andreas Braun <git@alcaeus.org>
Co-authored-by: Andreas Braun <git@alcaeus.org>
Co-authored-by: Andreas Braun <git@alcaeus.org>
@blink1073 blink1073 merged commit e796a48 into mongodb-labs:main Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants