Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

ENH Check if there are no actual changes to release #7

Merged

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Aug 30, 2023

@emteknetnz emteknetnz changed the title ENH Check is there are no actual changes to release ENH Check if there are no actual changes to release Aug 30, 2023
@emteknetnz emteknetnz force-pushed the pulls/1.0/no-changes branch 4 times, most recently from e38d4e5 to 55eeaa4 Compare August 30, 2023 03:42
action.yml Outdated
Comment on lines 163 to 164
STRING_A_COUNT=$(cat __compare.html | grep -c "<strong>$LATEST_TAG</strong> and") || true
STRING_B_COUNT=$(cat __compare.html | grep -c "<strong>$GITHUB_SHA</strong> are identical.") || true
Copy link
Member

Choose a reason for hiding this comment

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

Why are we counting these separately, instead of explicitly checking for the entire "<strong>$LATEST_TAG</strong> and <strong>$GITHUB_SHA</strong> are identical."?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because there's a line break in between them with a load of leading spaces for the second string

Copy link
Member

@GuySartorelli GuySartorelli Aug 30, 2023

Choose a reason for hiding this comment

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

I think this is too flimsy. They could add or remove whitespace at any time without affecting the way it renders in the browser - or change the HTML tags they're using (<strong> could swap out for a <span> with some css classes to handle the bold, for example). Might be better to do a quick php -a with strip_tags and do a whitespace-agnostic regex.

action.yml Outdated
Comment on lines 163 to 164
STRING_A_COUNT=$(cat __compare.html | grep -c "<strong>$LATEST_TAG</strong> and") || true
STRING_B_COUNT=$(cat __compare.html | grep -c "<strong>$GITHUB_SHA</strong> are identical.") || true
Copy link
Member

@GuySartorelli GuySartorelli Aug 30, 2023

Choose a reason for hiding this comment

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

I think this is too flimsy. They could add or remove whitespace at any time without affecting the way it renders in the browser - or change the HTML tags they're using (<strong> could swap out for a <span> with some css classes to handle the bold, for example). Might be better to do a quick php -a with strip_tags and do a whitespace-agnostic regex.

@emteknetnz
Copy link
Member Author

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@GuySartorelli GuySartorelli merged commit 75ce96d into silverstripe:1.0 Aug 31, 2023
4 checks passed
@GuySartorelli GuySartorelli deleted the pulls/1.0/no-changes branch August 31, 2023 02:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants