-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (44 loc) · 1.84 KB
/
intake.yml
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
# This workflow moves issues to the Project board when they receive the "accepted" label
# When WalletConnect Org members create issues they are automatically "accepted".
# Otherwise, they need to manually receive that label during intake.
name: intake
on:
issues:
types: [opened, labeled]
pull_request:
types: [opened, labeled]
jobs:
add-to-project:
name: Add issue to board
if: github.event_name == 'issues' && github.event.action == 'labeled' && github.event.label.name == 'accepted'
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
project-url: https://github.com/orgs/WalletConnect/projects/20
github-token: ${{ secrets.ASSIGN_TO_PROJECT_GITHUB_TOKEN }}
labeled: accepted
label-operator: OR
auto-promote:
name: auto-promote
if: github.event.action == 'opened'
runs-on: ubuntu-latest
steps:
- name: Check Core Team membership
uses: tspascoal/get-user-teams-membership@v1
id: is-core-team
with:
username: ${{ github.event_name != 'pull_request' && github.event.issue.user.login || github.event.sender.login }}
team: "Core Team"
GITHUB_TOKEN: ${{ secrets.ASSIGN_TO_PROJECT_GITHUB_TOKEN }}
- name: Print result
env:
CREATOR: ${{ github.event_name != 'pull_request' && github.event.issue.user.login || github.event.sender.login }}
IS_TEAM_MEMBER: ${{ steps.is-core-team.outputs.isTeamMember }}
run: echo "$CREATOR (Core Team Member $IS_TEAM_MEMBER) created this issue/PR"
- name: Label issues
if: ${{ steps.is-core-team.outputs.isTeamMember == 'true' }}
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
add-labels: "accepted"
repo-token: ${{ secrets.ASSIGN_TO_PROJECT_GITHUB_TOKEN }}