Skip to content
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

improve open pr matching for package updates #4025

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sean1588
Copy link
Member

@sean1588 sean1588 commented Feb 23, 2024

Description

We have issues where package names collide with titles of open PRs. This causes the update to the package to be skipped in these circumstances. An example of this that has occurred recently concerns the port provider. The word port is found in an open PR with the word Support in the title. Since port is a substring of support, our job thinks there is already a PR open to update the provider. This PR does a quick fix to improve this a bit by checking that there is a leading whitespace before the provider name. I tested this to the best of my ability by running the workflow against my branch and with the added whitespace, the Check if there is already an open PR stage of the job the which sets a variable to skip for this package, skip=1, is now longer being set, since I have added the whitespace (i.e. the variable is not set therefore telling the job not to skip the package)

Copy link

Your site preview for commit 3833c41 is ready! 🎉

http://registry--origin-pr-4025-3833c41d.s3-website.us-west-2.amazonaws.com/registry.

@sean1588 sean1588 changed the title improve open pr matching improve open pr matching for package updates Feb 23, 2024
@ringods
Copy link
Member

ringods commented Feb 25, 2024

Related to #3739

@@ -38,15 +38,15 @@ jobs:
id: regex-prov
run: |
if [[ "$REPO_SLUG" =~ (\/[^-]*-)(.*?$) ]]; then
echo "group2=${BASH_REMATCH[2]}" >> $GITHUB_OUTPUT
echo "group2= ${BASH_REMATCH[2]}" >> $GITHUB_OUTPUT
Copy link
Member

Choose a reason for hiding this comment

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

I'd probably add a comment indicating the spaces are significant (assuming I'm reading it right).

@toriancrane toriancrane linked an issue Mar 11, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix package update job PR regex
3 participants