Skip to content

Conversation

@rak-phillip
Copy link
Member

@rak-phillip rak-phillip commented Nov 20, 2025

Summary

This updates the sed expression to resolve script failures when backporting PRs.

Occurred changes and/or fixed issues

  • Update expression in sed command for backport pr workflow

Technical notes summary

Switching to @ helps sed to distinguish the regular expression from the command's delimiters. The original regular expression was designed to match text with a forward slash which contains a forward slash, which was misinterpreted as the end of the pattern.

Areas or cases that should be tested

This can be tested by creating a file that contains the contents of a PR and manually running the sed command against it:

➤ cat pr_body.txt | sed -E 's@(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved):?\s+([a-zA-Z09.-]+/[a-zA-Z0-9.-]*)?#[0-9]+\s*,?\s*@Original text redacted by port-pr.yaml @gI'

Areas which could experience regressions

Backport PR workflow.

Screenshot/Video

NA

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

codyrancher
codyrancher previously approved these changes Nov 20, 2025
Switching to `@` helps sed to distinguish the regular expression from the command's delimiters. The original regular expression was designed to match text with a forward slash which contains a forward slash, which was misinterpreted as the end of the pattern.

Signed-off-by: Phillip Rak <[email protected]>
@rak-phillip rak-phillip dismissed codyrancher’s stale review November 20, 2025 22:29

The merge-base changed after approval.

@rak-phillip rak-phillip merged commit 4af2e69 into rancher:master Nov 20, 2025
60 of 61 checks passed
@rak-phillip rak-phillip deleted the task/port-pr-sed branch November 20, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants