TBD
This action is intended to be used in upstream repository to help maintainers and contributors with backporting changes to the downstream (stable) repositories or branches. It is designed to be run on a schedule, see the example below.
name: Stable Backport Helper
on:
schedule:
# every hour
- cron: "0 * * * *"
permissions:
contents: read
jobs:
stable-backport-helper:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: jamacku/downstream-backport-helper@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
We also need to create a configuration file .github/downstream-backport-helper.yml
:
downstream:
- owner: systemd
repo: systemd-stable
branches:
- '*-stable'
- owner: systemd
repo: systemd
branches:
- '*-stable'
status-title: 'systemd-stable'
lookup-interval: 7
Action currently accepts the following options:
# ...
- uses: redhat-plumbers-in-action/downstream-backport-helper@v1
with:
config-path: <path to config file>
token: <GitHub token or PAT>
# ...
Path to configuration file. Configuration file format is described in: Config section.
- default value:
.github/downstream-backport-helper.yml
- requirements:
optional
GitHub token or PAT is used for creating labels and comments on Pull Request.
# required permission
permissions:
pull-requests: write
- default value:
undefined
- requirements:
required
- recomended value:
secrets.GITHUB_TOKEN
Action is configured using special config file: .github/downstream-backport-helper.yml
. The structure needs to be as follows:
downstream:
- git-server: https://github.com
owner: systemd
repo: systemd-stable
branches:
- '*-stable'
- owner: systemd
repo: systemd
branches:
- '*-stable'
status-title: 'systemd-stable'
lookup-interval: 7
The array of objects that describe downstream repositories that action will monitor for backports.
The Git server URL. Where the downstream repository is located.
Note
This is currently tested only with GitHub repositories.
- default value:
https://github.com
- requirements:
optional
The owner of the downstream repository.
- default value:
undefined
- requirements:
required
The name of the downstream repository.
- default value:
undefined
- requirements:
required
The array of branch names that are considered as stable branches or branches where the backports commits are applied.
- default value:
undefined
- requirements:
required
The title of the status that will be created on the upstream PRs. It is used to mark the PRs that are already backported to the downstream repository.
- default value:
<owner>/<repo>
- requirements:
optional
The number of days that the action will look back in the history of the downstream repository to find the backported commits.
- default value:
7
- requirements:
optional