Skip to content

Commit 1ea5b09

Browse files
feature: auto assign pr to project (#1772)
1 parent 250f31d commit 1ea5b09

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/label.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Auto Assign to Project(s)
2+
on:
3+
issues:
4+
types: [labeled]
5+
pull_request:
6+
types: [labeled]
7+
env:
8+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9+
jobs:
10+
assign_to_project:
11+
runs-on: ubuntu-latest
12+
name: Assign to Project
13+
steps:
14+
- name: Assign pull requests with `could-be-merged` label to `Waiting review`
15+
uses: srggrs/assign-one-project-github-action@1.2.0
16+
if: |
17+
contains(github.event.issue.labels.*.name, 'could-be-merged') ||
18+
contains(github.event.pull_request.labels.*.name, 'could-be-merged')
19+
with:
20+
project: "https://github.com/orgs/openresty/projects/1"
21+
column_name: "Waiting Review from agentzh"

.mergify.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,11 @@ pull_request_rules:
3333
label:
3434
remove:
3535
- needs-test-cases
36+
- name: add label could-be-merged
37+
conditions:
38+
- "#approved-reviews-by>=2"
39+
- status-success=Travis CI - Pull Request
40+
actions:
41+
label:
42+
add:
43+
- could-be-merged

0 commit comments

Comments
 (0)