2022-12-29 10:38:44 +00:00
|
|
|
name: Add new issues to product management project
|
2022-09-21 07:32:06 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
issues:
|
|
|
|
types:
|
|
|
|
- opened
|
2024-02-02 10:59:37 +00:00
|
|
|
pull_request_target:
|
|
|
|
types:
|
|
|
|
- opened
|
2022-09-21 07:32:06 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
add-to-project:
|
2024-02-02 10:59:37 +00:00
|
|
|
name: Add issue and community pr to project
|
2022-09-21 07:32:06 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-02-02 10:59:37 +00:00
|
|
|
- name: add issue
|
2024-04-15 10:36:23 +00:00
|
|
|
uses: actions/add-to-project@v1.0.1
|
2024-02-02 10:59:37 +00:00
|
|
|
if: ${{ github.event_name == 'issues' }}
|
2022-09-21 07:32:06 +00:00
|
|
|
with:
|
|
|
|
# You can target a repository in a different organization
|
|
|
|
# to the issue
|
2022-12-30 08:17:00 +00:00
|
|
|
project-url: https://github.com/orgs/zitadel/projects/2
|
2022-09-21 07:32:06 +00:00
|
|
|
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
|
2024-02-02 10:59:37 +00:00
|
|
|
- uses: tspascoal/get-user-teams-membership@v3
|
|
|
|
id: checkUserMember
|
2024-03-01 07:10:14 +00:00
|
|
|
if: github.actor != 'dependabot[bot]'
|
2024-02-02 10:59:37 +00:00
|
|
|
with:
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }}
|
|
|
|
- name: add pr
|
2024-04-15 10:36:23 +00:00
|
|
|
uses: actions/add-to-project@v1.0.1
|
2024-03-01 07:10:14 +00:00
|
|
|
if: ${{ github.event_name == 'pull_request_target' && github.actor != 'dependabot[bot]' && !contains(steps.checkUserMember.outputs.teams, 'engineers')}}
|
2024-02-02 10:59:37 +00:00
|
|
|
with:
|
|
|
|
# You can target a repository in a different organization
|
|
|
|
# to the issue
|
|
|
|
project-url: https://github.com/orgs/zitadel/projects/2
|
|
|
|
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
|
2024-03-07 15:38:38 +00:00
|
|
|
- uses: actions-ecosystem/action-add-labels@v1.1.3
|
2024-03-01 07:10:14 +00:00
|
|
|
if: ${{ github.event_name == 'pull_request_target' && github.actor != 'dependabot[bot]' && !contains(steps.checkUserMember.outputs.teams, 'staff')}}
|
2024-02-02 10:59:37 +00:00
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.ADD_TO_PROJECT_PAT }}
|
|
|
|
labels: |
|
|
|
|
os-contribution
|