mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
512d228111
`backport` is too similar `ci:backport release-x.y` and causes confusion.
37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
name: backport
|
|
on:
|
|
pull_request_target:
|
|
types: [closed, labeled]
|
|
jobs:
|
|
backport:
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
name: Backport Pull Request
|
|
if: github.event.pull_request.merged
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Create backport PR
|
|
id: backport
|
|
uses: korthout/backport-action@v2
|
|
with:
|
|
pull_title: "${pull_title}"
|
|
label_pattern: "^ci:backport ([^ ]+)$"
|
|
# https://github.com/korthout/backport-action/pull/399
|
|
experimental: >
|
|
{
|
|
"detect_merge_method": true
|
|
}
|
|
|
|
- if: ${{steps.backport.outputs.was_successful == 'true'}}
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
github.rest.issues.addLabels({
|
|
issue_number: ${{steps.backport.outputs.created_pull_numbers}},
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
labels: ['target:release']
|
|
})
|