-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 automatic backport flow #5365
Merged
waiting-for-dev
merged 2 commits into
solidusio:main
from
nebulab:waiting-for-dev/backport_title_from_original_pr
Sep 5, 2023
Merged
Improve automatic backport flow #5365
waiting-for-dev
merged 2 commits into
solidusio:main
from
nebulab:waiting-for-dev/backport_title_from_original_pr
Sep 5, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
changelog:repository
Changes to the repository not within any gem
label
Aug 31, 2023
waiting-for-dev
changed the title
Make automatic backporting PRs take the title from the original one
Improve automatic backport flow
Sep 4, 2023
sorenlouv
reviewed
Sep 4, 2023
waiting-for-dev
force-pushed
the
waiting-for-dev/backport_title_from_original_pr
branch
from
September 4, 2023 13:25
b200f6e
to
4f58428
Compare
Up until now, the title of the backporting PRs was the name of the merge commit, which is not very readable. This commit builds the title from the original PR title and the target branch, e.g.: [v4.2] Fix some bug This is now possible thanks to upstream's recent changes. See sorenlouv/backport#455 for details.
None of the automatically generated PRs for backports can trigger the labeler flow, which resulted in them not being added to the automatic release notes unless manual work was done to update the labels. The reason is that an action in a workflow can't trigger another action, and that's by design. As referenced in an issue from the `create-pull-request` project [1]: > An action in a workflow run can't trigger a new workflow run. For > example, if an action pushes code using the repository's GITHUB_TOKEN, a > new workflow will not run even when the repository contains a workflow > configured to run when push events occur. On that issue, there's also a reference from a response from GH support: > This is a deliberate decision by the Actions team in order to prevent accidental "infinite loop" situations, and as an anti-abuse measure. > You will be able to work around this using a Personal Access Token in > place of the provided token. As this needs to be explicitly provided it > will remove any potential for possible abuse, so we recommend using this > method when needing to create a pull request. As said, we could work around that by using a personal token, which could be scoped to the `solidusio/solidus` repository. However, we don't think that would be a good idea because of security & practical concerns. Thanks to upstream work in the backporter tool [2] we can now copy the labels from the original PR to the backported PRs, avoiding the need for manual work. [1] - peter-evans/create-pull-request#48 [2] - sorenlouv/backport#456 (comment)
waiting-for-dev
force-pushed
the
waiting-for-dev/backport_title_from_original_pr
branch
from
September 4, 2023 13:28
4f58428
to
6ecc1a1
Compare
elia
approved these changes
Sep 4, 2023
rainerdema
approved these changes
Sep 4, 2023
waiting-for-dev
deleted the
waiting-for-dev/backport_title_from_original_pr
branch
September 5, 2023 03:34
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Make automatic backporting PRs take the title from the original one
Up until now, the title of the backporting PRs was the name of the merge commit, which is not very readable. This commit builds the title from the original PR title and the target branch, e.g.:
This is now possible thanks to upstream's recent changes. See sorenlouv/backport#455 for details.
Automatically copy labels from original PR to backported PRs
None of the automatically generated PRs for backports can trigger the labeler flow, which resulted in them not being added to the automatic release notes unless manual work was done to update the labels. The reason is that an action in a workflow can't trigger another action, and that's by design. As referenced in an issue from the
create-pull-request
project:On that issue, there's also a reference from a response from GH support:
As said, we could work around that by using a personal token, which could be scoped to the
solidusio/solidus
repository. However, we don't think that would be a good idea because of security & practical concerns.Thanks to upstream work in the backporter tool [2] we can now copy the labels from the original PR to the backported PRs, avoiding the need for manual work.
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: