-
Notifications
You must be signed in to change notification settings - Fork 0
ci: Push labels to PR title [CI🤖] #22
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
.github/workflows/auto-add-labels.yml:41
- The GitHub CLI command 'gh pr edit' may fail if the CLI is not authenticated. Consider adding a step to authenticate using the provided GH_TOKEN before running this command.
gh pr edit ${{ github.event.pull_request.number }} --title "$new_pr_title"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
.github/workflows/auto-add-labels.yml:30
- The regex in the sed command may not correctly handle all cases: if the PR title does not strictly conform to the expected '[labels] Title' format, it could result in an empty value. Consider refining the regex or adding additional logic to ensure the title is updated correctly when no initial label prefix is present.
new_pr_title=$(echo "$old_pr_title" | sed -n 's/^\[\([^]]*\)\] *//p')
1ab0068
to
d1abf7f
Compare
@@ -15,4 +15,28 @@ jobs: | |||
label: | |||
runs-on: ubuntu-latest | |||
steps: | |||
- uses: actions/labeler@v5 | |||
- uses: actions/checkout@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the checkout needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not anymore, it was needed for using GH shell. Now that we moved to REST API, that should not be needed anymore. Fixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the benefit of this, other than having a title? For searching? Does this also affect the commit message that is merged?
If this is across many sub-repos, won't the title be potentially very long, to the point that it runs off the end of the text area for a title into the commit message?
…arts into label_pr_title
This pull request is stale because it has been open 30 days with no activity. Make a comment or update the PR to avoid closing PR after 15 days. |
Based on the labels from
.github/labeler.yml
add labels to the PR title too.