-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (79 loc) · 2.61 KB
/
housekeeping.yml
File metadata and controls
85 lines (79 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Housekeeping
on:
issues:
types: [opened]
pull_request_target:
types: [opened, ready_for_review]
jobs:
issue-management:
if: ${{ github.event.issue }}
name: Add issues to project and add triage label
uses: rollkit/.github/.github/workflows/reusable_housekeeping.yml@v0.4.1
secrets: inherit
permissions:
issues: write
pull-requests: write
with:
run-labels: true
labels-to-add: "needs-triage"
run-projects: true
project-url: https://github.com/orgs/rollkit/projects/7
add-pr-to-project:
# ignore dependabot PRs
if: ${{ github.event.pull_request && github.actor != 'dependabot[bot]' }}
name: Add PRs to project
uses: rollkit/.github/.github/workflows/reusable_housekeeping.yml@v0.4.1
secrets: inherit
permissions:
issues: write
pull-requests: write
with:
run-projects: true
project-url: https://github.com/orgs/rollkit/projects/7
auto-add-reviewer:
name: Auto add reviewer to PR
if: github.event.pull_request
uses: rollkit/.github/.github/workflows/reusable_housekeeping.yml@v0.4.1
secrets: inherit
permissions:
issues: write
pull-requests: write
with:
run-auto-request-review: true
auto-add-assignee-pr:
# ignore dependabot PRs
if: ${{ github.event.pull_request && github.actor != 'dependabot[bot]' }}
name: Assign PR to creator
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Set pull_request url and creator login
# yamllint disable rule:line-length
run: |
echo "PR=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV
echo "CREATOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
# yamllint enable rule:line-length
- name: Assign PR to creator
run: gh pr edit ${{ env.PR }} --add-assignee ${{ env.CREATOR }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
auto-add-assignee-label:
if: ${{ github.event.issue }}
name: Assign issue to creator
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Checkout the repository
uses: actions/checkout@v6
- name: Set issue number and creator login
run: |
echo "ISSUE=${{ github.event.issue.number }}" >> $GITHUB_ENV
echo "CREATOR=${{ github.event.issue.user.login }}" >> $GITHUB_ENV
- name: Assign issue to creator
run: gh issue edit ${{ env.ISSUE }} --add-assignee ${{ env.CREATOR }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}