-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Backport action #8191
Backport action #8191
Conversation
Fixes #8181 This commit includes the configuration file for an action that: * When a PR that has a label like "Backport <branch>" is merged, it will trigger a backport action * If the PR commits merge cleanly into the target branch, a new PR will be created against it, assigned to the same user as the merged one. The usual checks will be run on the new PR * If the commits don't merge cleanly, a comment will be posted on the orginal PR with the manual commands to fix the conflicts, and the PR will be labelled with "Backport failed" * Additionally, Tech Team members can trigger a backport on open or already closed PRs adding a comment starting with `/backport` (and adding the relevant label) Some more details: * The action is run using a token from the @ckanbot account, this needs to be stored in the repository secrets (`BACKPORT_ACTION_PAT`) * There are also two public variables (`TECH_TEAM_USER_IDS` and `CKANBOT_USER_ID`) that need to be added to the repository variables. * The action used source code code can be found at https://github.com/korthout/backport-action
Is there a reason for using personal access token instead of github token in this ? PATs are somewhat annoying as they tend to expire (which is a good thing, otherwise no one would ever rotate them). But using them would add manual labor to rotate them for this action to work. |
@Zharktas we can choose any of the two types of tokens, in fact for the initial testing I used one of the "legacy" tokens. The new fine-grained tokens allow you to restrict permission to one particular repo and limit the permissions within this, rather than just impersonate an account, but yes they enforce an expiration date. |
@Zharktas any objections to merge this? we can experiment with different types of tokens once this is merged. I'd like to start testing it with the new dev-v2.11 branch |
Just to note, i had no objections for this, as the rotate cycle is somewhat reasonable 👍 |
Fixes #8181
As discussed in the issue, this PR includes the configuration file for an action that:
/backport
(and adding the relevant label)Some more details:
BACKPORT_ACTION_PAT
)TECH_TEAM_USER_IDS
andCKANBOT_USER_ID
) that need to be added to the repository variables.