Skip to content

chore(deps): update dependency phpstan/phpstan to v1.10.39 #187

chore(deps): update dependency phpstan/phpstan to v1.10.39

chore(deps): update dependency phpstan/phpstan to v1.10.39 #187

Workflow file for this run

# https://docs.github.com/en/actions
name: "Triage"
on: # yamllint disable-line rule:truthy
pull_request_target:
types:
- "opened"
jobs:
label:
name: "Label"
runs-on: "ubuntu-latest"
steps:
- name: "Add labels based on branch name"
uses: "actions/github-script@v6"
with:
github-token: "${{ secrets.LCTRS_BOT_TOKEN }}"
script: |
const branchPrefixLabels = {
feature: "enhancement",
fix: "bug",
};
const pullRequest = context.payload.pull_request;
const branchName = pullRequest.head.ref;
const matches = branchName.match(new RegExp('^([^/]+)\/'));
if (!matches instanceof Array) {
return;
}
if (!branchPrefixLabels.hasOwnProperty(matches[1])) {
return;
}
const label = branchPrefixLabels[matches[1]];
try {
await github.rest.issues.addLabels({
issue_number: pullRequest.number,
labels: [
label,
],
owner: context.repo.owner,
repo: context.repo.repo,
});
} catch (error) {
core.setFailed(error.message);
}