Skip to content

Commit

Permalink
Merge pull request #6 from carloscastrojumo/fix-labels
Browse files Browse the repository at this point in the history
Fix labels
  • Loading branch information
carloscastrojumo committed Feb 21, 2022
2 parents 2640b48 + 7f2767a commit 6c01602
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
8 changes: 6 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/github-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,15 @@ export async function createPullRequest(
github.context.payload &&
github.context.payload.pull_request &&
github.context.payload.pull_request.labels

if (prLabels) {
inputs.labels.concat(prLabels)
for (const item of prLabels) {
if (item.name !== inputs.branch) {
inputs.labels.push(item.name)
}
}
}

core.info(`Applying labels '${inputs.labels}'`)
await octokit.issues.addLabels({
owner,
Expand Down

0 comments on commit 6c01602

Please sign in to comment.