Skip to content

Improve valid-milestone-change workflow#17787

Open
richard-cox wants to merge 1 commit into
rancher:masterfrom
richard-cox:update-valid-milestone-change
Open

Improve valid-milestone-change workflow#17787
richard-cox wants to merge 1 commit into
rancher:masterfrom
richard-cox:update-valid-milestone-change

Conversation

@richard-cox
Copy link
Copy Markdown
Member

Summary

  • remove org level permission (this was the reason for the 'no jobs run' notification on forks due to it failing)
  • org level permission not allowed with defaut gh token, so replace with our vault one
  • remove the 'edit' milestone change trigger. we might still need this but lets start smaller
  • remove vs code lint warnings via defining envs up front
  • use echo delimiter and toJSON to avoid injection vulnerabilities

Technical notes summary

Areas or cases that should be tested

  • the workflow is currently disabled, and also only outputs to a slack target that just DMs me
  • once merged i'll enable the the workflow again and test

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility
  • The PR has considered, and if applicable tested with, the three Global Roles Admin, Standard User and User Base

- remove org level permission (this was the reason for the 'no jobs run' notification on forks due to it failing)
- org level permission not allowed with defaut gh token, so replace with our vault one
- remove the 'edit' milestone change trigger. we might still need this but lets start smaller
- remove vs code lint warnings via defining envs up front
- use echo delimiter and toJSON to avoid injection vulnerabilities
@richard-cox richard-cox added this to the v2.15.0 milestone May 22, 2026
@richard-cox richard-cox self-assigned this May 22, 2026
Copy link
Copy Markdown
Member

@marcelofukumoto marcelofukumoto left a comment

Choose a reason for hiding this comment

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

I didnt execute the WORKFLOW, just checking line by line and trying to check code structure.

echo "OLD_MILESTONE=None"
echo "NEW_MILESTONE=$ISSUE_MILESTONE"
elif [ "$ACTION" == "demilestoned" ]; then
echo "OLD_MILESTONE=$ISSUE_MILESTONE"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Question
just comparing with the previous flow. The OLD_MILESTONE sets the value to

echo "OLD_MILESTONE=${{ github.event.milestone.title }}"

This one sets to $ISSUE_MILESTONE which. is...

        ISSUE_MILESTONE: ${{ github.event.issue.milestone.title }}

It is different. Not sure about the logic, So mostly pointing out this difference.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

had pondered about that too. went with the assumption it was a typo when originally created. don't think i've seen a full run of this yet, so in all worlds will require some test / fix cycles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants