Skip to content

[Snyk] Upgrade zone.js from 0.14.10 to 0.15.0 #1722

[Snyk] Upgrade zone.js from 0.14.10 to 0.15.0

[Snyk] Upgrade zone.js from 0.14.10 to 0.15.0 #1722

name: Label and assign PRs
on:
pull_request:
branches: ['develop']
jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/github-script@v6
with:
script: |
const labelMap = new Map([
["feat", ["enhancement"]],
["fix", ["bug"]],
["test", ["coverage"]],
["refactor", ["refactor"]],
["chore", ["task"]],
]);
const labels = labelMap.get(context.payload.pull_request.title.split("(")[0])
if (labels) {
github.rest.issues.addLabels({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels,
});
} else {
console.log("No label found. Please format PR title.")
}
github.rest.issues.addAssignees({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
assignees: [context.payload.pull_request.user.login]
})