mirror of
https://github.com/neovim/neovim.git
synced 2026-05-25 14:28:28 +00:00
ci: bump actions/github-script Bumps the github-actions group with 1 update in the / directory: [actions/github-script](https://github.com/actions/github-script). Updates `actions/github-script` from 8 to 9 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v8...v9) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
35 lines
954 B
YAML
35 lines
954 B
YAML
name: "labeler: issue"
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
labeler:
|
|
permissions:
|
|
issues: write
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: check issue title
|
|
uses: actions/github-script@v9
|
|
with:
|
|
script: |
|
|
const title = context.payload.issue.title;
|
|
const titleSplit = title.split(/\b/).map(e => e.toLowerCase());
|
|
const keywords = ['api', 'treesitter', 'ui', 'lsp'];
|
|
var match = new Set();
|
|
for (const keyword of keywords) {
|
|
if (titleSplit.includes(keyword)) {
|
|
match.add(keyword)
|
|
}
|
|
}
|
|
if (match.size !== 0) {
|
|
github.rest.issues.addLabels({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: context.issue.number,
|
|
labels: Array.from(match)
|
|
})
|
|
}
|