Skip to content

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

daniele-moro
Copy link
Contributor

@daniele-moro daniele-moro commented Apr 14, 2025

Based on the labels from .github/labeler.yml add labels to the PR title too.

@github-actions github-actions bot changed the title ci: Push labels to PR title [CI🤖] ci: Push labels to PR title Apr 14, 2025
@daniele-moro daniele-moro added bug Something isn't working documentation Improvements or additions to documentation and removed bug Something isn't working CI🤖 labels Apr 14, 2025
@daniele-moro daniele-moro changed the title [CI🤖] ci: Push labels to PR title [CI🤖,eeee] ci: Push labels to PR title Apr 14, 2025
@github-actions github-actions bot changed the title [CI🤖,eeee] ci: Push labels to PR title [CI🤖] ci: Push labels to PR title Apr 14, 2025
@daniele-moro daniele-moro removed bug Something isn't working documentation Improvements or additions to documentation labels Apr 14, 2025
@daniele-moro daniele-moro requested a review from Copilot April 14, 2025 14:02
Copy link

@Copilot Copilot AI left a 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"

@daniele-moro daniele-moro changed the title [CI🤖] ci: Push labels to PR title [TEST] ci: Push labels to PR title Apr 14, 2025
@sys-orch sys-orch changed the title [TEST] ci: Push labels to PR title [CI🤖] ci: Push labels to PR title Apr 14, 2025
@daniele-moro daniele-moro requested a review from Copilot April 14, 2025 14:21
Copy link

@Copilot Copilot AI left a 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')

@daniele-moro daniele-moro marked this pull request as draft April 14, 2025 14:24
@@ -15,4 +15,28 @@ jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
- uses: actions/checkout@v4
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the checkout needed?

Copy link
Contributor Author

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.

Copy link
Contributor

@zdw zdw left a 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?

@sys-orch sys-orch changed the title [CI🤖] ci: Push labels to PR title [CI🤖] [CI🤖] ci: Push labels to PR title Apr 15, 2025
@sys-orch sys-orch changed the title [CI🤖] [CI🤖] ci: Push labels to PR title [CI🤖] [CI🤖] ci: Push labels to PR title [CI🤖] Apr 15, 2025
@daniele-moro daniele-moro changed the title [CI🤖] [CI🤖] ci: Push labels to PR title [CI🤖] ci: Push labels to PR title [CI🤖] Apr 15, 2025
Copy link

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.

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.

6 participants