Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR for event testing only #10

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
40 changes: 40 additions & 0 deletions .github/workflows/needs-triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Add/Remove needs-triage

on:
issues:
types: [opened, labeled, unlabeled]
issue_comment:
types: [created]
# Not sure if we actually want pull_request or pull_request_target events
pull_request:
types: [opened, edited, labeled, synchronize, unlabeled]
pull_request_target:
types: [opened, labeled, synchronize, unlabeled]
pull_request_review:
types: [submitted]

permissions: {}

jobs:
event-handler:
permissions:
issues: write # to set status (azure/azure-sdk-actions)
pull-requests: write # We might not need this.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pull-requests: write # We might not need this.
pull-requests: write # We might not need this. FOOBAR

name: Handle ${{ github.event_name }} ${{ github.event.action }} event
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check if needs-triage needs to be added/removed from an issue
run: |
echo "$($env:GITHUB_PAYLOAD)"
shell: pwsh
# The with is only necessary if you're calling an external action from a different repo
# for example - uses: azure/azure-sdk-actions@main would require a with
# with:
# This GITHUB_TOKEN is produced and handed to us by GitHub. It's best to use
# this token instead of the azure github token because this particular one won't
# be subject to throttling.
# token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_PAYLOAD: ${{ toJson(github.event) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}