Skip to content

Commit

Permalink
Fix previous commit (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
tibdex authored Apr 9, 2022
1 parent fb9853c commit 257e83a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ jobs:
if: >
github.event.pull_request.merged
&& (
(
github.event.action == 'closed'
&& contains(github.event.pull_request.labels.*.name, 'backport')
)
github.event.action == 'closed'
|| (
github.event.action == 'labeled'
&& contains(github.event.label.name, 'backport')
)
)
steps:
- name: Backport
uses: tibdex/backport@v1
uses: tibdex/backport@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ inputs:
The data properties are:
- base: backport PR's base branch
- labels: array containing the original PR's labels
- labels: array containing the original PR's labels, excluding those matching `label_pattern`.
default: "[]"
github_token:
description: Token for the GitHub API.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backport",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT",
"main": "dist/index.js",
"files": [
Expand Down
4 changes: 3 additions & 1 deletion src/backport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ const backport = async ({
const head = getHead({ base, number });
const labels = getLabels({
base,
labels: originalLabels.map(({ name }) => name),
labels: originalLabels
.map(({ name }) => name)
.filter((label) => !labelRegExp.test(label)),
});
const title = getTitle({ base, number, title: originalTitle });

Expand Down

0 comments on commit 257e83a

Please sign in to comment.