mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
0c901baee1
This reverts commit 559aa4179c
.
I mistakenly believed both ways of writing were equivalent; this is
untrue. Setting continue-on-error to true will make the job pass, but
an error annotation will still be created which is misleading since it's
not actually an error.
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: "Pull Request Labeler"
|
|
on:
|
|
pull_request_target:
|
|
types: [opened]
|
|
jobs:
|
|
|
|
triage:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/labeler@main
|
|
with:
|
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
type-scope:
|
|
runs-on: ubuntu-latest
|
|
needs: ["triage"]
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GH_REPO: ${{ github.repository }}
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
steps:
|
|
- name: "Extract commit type and add as label"
|
|
run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|([[:alpha:]]+)(\(.*\))?!?:.*|\1|')" || true
|
|
- name: "Extract commit scope and add as label"
|
|
run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+\((.+)\)!?:.*|\1|')" || true
|
|
|
|
upload-pr-number:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Save PR number
|
|
run: |
|
|
mkdir -p pr
|
|
echo ${{ github.event.number }} > pr/pr_number
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: pr_number
|
|
path: pr/
|