Skip to content

Commit

Permalink
Merge pull request #55 from jeanduplessis/main
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanduplessis authored Dec 8, 2022
2 parents 35356a1 + 80ebf49 commit 80da720
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
secrets:
UPBOUND_BOT_GITHUB_TOKEN:
description: 'A PAT with permissions that allow adding issues to a project'
description: 'A PAT with permissions that allow labeling and adding issues to a project'
required: true

jobs:
Expand All @@ -14,7 +14,7 @@ jobs:
- name: Debug
run: |
echo "github.event.issue.author_association: ${{ github.event.issue.author_association }}"
community_issue_triage:
community-issue-triage:
if: ${{ (github.event.issue.author_association != 'OWNER' &&
github.event.issue.author_association != 'MEMBER' &&
github.event.issue.author_association != 'CONTRIBUTOR' &&
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/pr-triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Pull Request Triage

on:
workflow_call:
secrets:
UPBOUND_BOT_GITHUB_TOKEN:
description: 'A PAT with permissions that allow labeling and adding PRs to a project'
required: true

jobs:
debug:
runs-on: ubuntu-22.04
steps:
- name: Debug
run: |
echo "github.event.pull_request.author_association: ${{ github.event.pull_request.author_association }}"
community-pr-triage:
if: ${{ (github.event.pull_request.author_association != 'OWNER' &&
github.event.pull_request.author_association != 'MEMBER' &&
github.event.pull_request.author_association != 'CONTRIBUTOR' &&
github.event.pull_request.author_association != 'COLLABORATOR' ) }}
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- name: Label as community PR
if: ${{ !contains(github.event.pull_request.labels.*.name, 'community') }}
uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: github.event.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["community"]
})
- name: Add PR to Extensions Community Support project
uses: actions/[email protected]
with:
project-url: https://github.com/orgs/upbound/projects/104/views/1
github-token: ${{ secrets.UPBOUND_BOT_GITHUB_TOKEN }}

0 comments on commit 80da720

Please sign in to comment.