forked from korthout/backport-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
109 lines (105 loc) · 4.68 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Backport merged pull requests to selected branches
description: >
Fast and flexible action to cherry-pick commits from labeled pull requests
author: korthout
inputs:
copy_assignees:
description: >
Controls whether to copy the assignees from the original pull request to the backport pull request.
By default, the assignees are not copied.
default: false
copy_labels_pattern:
description: >
Regex pattern to match github labels which will be copied from the original pull request to the backport pull request.
Note that labels matching `label_pattern` are excluded.
By default, no labels are copied.
copy_milestone:
description: >
Controls whether to copy the milestone from the original pull request to the backport pull request.
By default, the milestone is not copied.
default: false
copy_requested_reviewers:
description: >
Controls whether to copy the requested reviewers from the original pull request to the backport pull request.
Note that this does not request reviews from those users who already reviewed the original pull request.
By default, the requested reviewers are not copied.
default: false
experimental:
description: >
Configure experimental features by passing a JSON object.
The following properties can be specified:
#### `detect_merge_method`
When enabled, the action detects the method used to merge the pull request.
- For "Squash and merge", the action cherry-picks the squashed commit.
- For "Rebase and merge", the action cherry-picks the rebased commits.
- For "Merged as a merge commit", the action cherry-picks the commits from the pull request.
By default, the action always cherry-picks the commits from the pull request.
default: >
{
"detect_merge_method": false
}
github_token:
description: >
Token to authenticate requests to GitHub.
Used to create and label pull requests and to comment.
Either GITHUB_TOKEN or a repo-scoped Personal Access Token (PAT).
default: ${{ github.token }}
github_workspace:
description: Working directory for the backport action.
default: ${{ github.workspace }}
label_pattern:
description: >
Regex pattern to match the backport labels on the merged pull request.
Must contain a capture group for the target branch.
The action will backport the pull request to each matched target branch.
Note that the pull request's headref is excluded automatically.
default: ^backport ([^ ]+)$
merge_commits:
description: >
Specifies how the action should deal with merge commits on the merged pull request.
When set to `fail` the backport fails when the action detects one or more merge commits.
When set to `skip` the action only cherry-picks non-merge commits, i.e. it ignores merge commits.
default: fail
pull_description:
description: >
Template used as description (i.e. body) in the pull requests created by this action.
Placeholders can be used to define variable values.
These are indicated by a dollar sign and curly braces (`${placeholder}`).
Please refer to this action's README for all available placeholders.
default: |-
# Description
Backport of #${pull_number} to `${target_branch}`.
pull_title:
description: >
Template used as the title in the pull requests created by this action.
Placeholders can be used to define variable values.
These are indicated by a dollar sign and curly braces (`${placeholder}`).
Please refer to this action's README for all available placeholders.
default: >-
[Backport ${target_branch}] ${pull_title}
target_branches:
description: >
The action will backport the pull request to each specified target branch (space-delimited).
Note that the pull request's headref is excluded automatically.
Can be used in addition to backport labels.
By default, only backport labels are used to specify the target branches.
outputs:
created_pull_numbers:
description: >
Space-separated list containing the identifying number of each created pull request.
Or empty when the action created no pull requests.
For example, '123' or '123 124 125'.
was_successful:
description: >
Whether or not the changes could be backported successfully to all targets.
Either 'true' or 'false'.
was_successful_by_target:
description: >
Whether or not the changes could be backported successfully to all targets - broken down by target.
Follows the pattern '{{label}}=true|false'.
runs:
using: "node20"
main: "dist/index.js"
branding:
icon: 'copy'
color: 'yellow'