diff --git a/.github/workflows/notify-models.yaml b/.github/workflows/notify-models.yaml index 1ab803635..609b7cf00 100644 --- a/.github/workflows/notify-models.yaml +++ b/.github/workflows/notify-models.yaml @@ -1,9 +1,13 @@ name: Notifications for new models on: - pull_request: + pull_request_target: types: - closed +permissions: + contents: read + pull-requests: read + jobs: notify-discord: if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'area/ai-model')) }} @@ -12,7 +16,7 @@ jobs: - uses: actions/checkout@v5 with: fetch-depth: 0 # needed to checkout all branches for this Action to work - # Check the PR diff using the current branch and the base branch of the PR + ref: ${{ github.event.pull_request.head.sha }} # Checkout the PR head to get the actual changes - uses: GrantBirki/git-diff-action@v2.8.1 id: git-diff-action with: @@ -85,7 +89,7 @@ jobs: - uses: actions/checkout@v5 with: fetch-depth: 0 # needed to checkout all branches for this Action to work - # Check the PR diff using the current branch and the base branch of the PR + ref: ${{ github.event.pull_request.head.sha }} # Checkout the PR head to get the actual changes - uses: GrantBirki/git-diff-action@v2.8.1 id: git-diff-action with: