Skip to content

ci(deps): bump ridedott/merge-me-action from 2.10.108 to 2.10.110 in the non-major group #1025

ci(deps): bump ridedott/merge-me-action from 2.10.108 to 2.10.110 in the non-major group

ci(deps): bump ridedott/merge-me-action from 2.10.108 to 2.10.110 in the non-major group #1025

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@v7.0.1"
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);
}