Skip to content

Commit

Permalink
chore: use team.yml to filter PR noti
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyutaotao committed Apr 23, 2024
1 parent 287759e commit 924e336
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/issue-pr-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
SENDER=${{ github.event.sender.login }}
API_ENDPOINT="https://api.github.com/orgs/$REPO_OWNER/members/$SENDER"
AUTH_HEADER="Authorization: token $GH_TOKEN"
HTTP_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "$AUTH_HEADER" "$API_ENDPOINT")
echo "HTTP response status: $HTTP_RESPONSE"
if [ "$HTTP_RESPONSE" -eq 204 ]; then
TEAMS_FILE="./.github/teams.yml"
if grep -q -- "\"@$SENDER\"" $TEAMS_FILE; then
echo "::set-output name=skip::true"
echo "Workflow triggered by a project member: $SENDER , will NOT trigger lark notify"
else
Expand Down

0 comments on commit 924e336

Please sign in to comment.