From 924e336db3258f637f8c762387682fd4e9a1bc33 Mon Sep 17 00:00:00 2001 From: yutao Date: Tue, 23 Apr 2024 17:10:37 +0800 Subject: [PATCH] chore: use team.yml to filter PR noti --- .github/workflows/issue-pr-trigger.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/issue-pr-trigger.yml b/.github/workflows/issue-pr-trigger.yml index 21e7df4d59e..3d6debbf5fd 100644 --- a/.github/workflows/issue-pr-trigger.yml +++ b/.github/workflows/issue-pr-trigger.yml @@ -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