๐Ÿ“ฆ wagoodman / project-add-test

๐Ÿ“„ add-to-project.yaml ยท 51 lines
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
51name: Add Issues and PRs to the Community Board

on:
  issues:
    types:
      - opened
      - reopened
      - transferred
      - labeled

  pull_request:
    types:
      - labeled
      - opened
      - reopened

jobs:

  show-info:
    name: Show event info
    runs-on: ubuntu-latest
    steps:
      - name: Show event info
        run: |
          echo "event_name: ${{ github.event_name }}"
          echo "event: ${{ toJson(github.event) }}"

  add-issue-to-board:
    name: Add issue to the community board
    if: github.event_name == 'issue' && !contains(fromJson('["wagoodman"]'), github.event.issue.user.login)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/add-to-project@v0.5.0
        with:
          project-url: https://github.com/users/wagoodman/projects/1
          github-token: ${{ secrets.OSS_PROJECT_GH_TOKEN }}
          labeled: bug, enhancement
          label-operator: OR

  add-pr-to-board:
    name: Add PR to the community board
    if: github.event_name == 'pull_request' && !contains(fromJson('["wagoodman"]'), github.event.pull_request.user.login)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/add-to-project@v0.5.0
        with:
          project-url: https://github.com/users/wagoodman/projects/1
          github-token: ${{ secrets.OSS_PROJECT_GH_TOKEN }}
          labeled: bug, enhancement
          label-operator: OR