Skip to content

Commit 8bc37ba

Browse files
committed
ci: github workflow automation
1 parent a1af7a1 commit 8bc37ba

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Remove Question Label on Issue Comment
2+
3+
on: [issue_comment]
4+
5+
jobs:
6+
# Remove the "question" label when a new comment is added.
7+
# This lets me ask a question, tag the issue with "question", and filter out all "question"-tagged
8+
# issues in my "needs triage" filter.
9+
remove_question:
10+
runs-on: ubuntu-latest
11+
if: github.event.sender.login != 'stevearc'
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions-ecosystem/action-remove-labels@v1
15+
with:
16+
labels: question
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Request Review
2+
permissions:
3+
pull-requests: write
4+
on:
5+
pull_request_target:
6+
types: [opened, reopened, ready_for_review, synchronize]
7+
branches-ignore:
8+
- "release-please--**"
9+
10+
jobs:
11+
# Request review automatically when PRs are opened
12+
request_review:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Request Review
16+
uses: actions/github-script@v7
17+
if: github.actor != 'stevearc'
18+
with:
19+
github-token: ${{secrets.GITHUB_TOKEN}}
20+
script: |
21+
const pr = context.payload.pull_request;
22+
github.rest.pulls.requestReviewers({
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
pull_number: pr.number,
26+
reviewers: ['stevearc']
27+
});

0 commit comments

Comments
 (0)