Only add PR comments for internal PR (#7448)

* Add write permission for issues

* Add write permission to PRs

* Update ChangeLog

* Fixed ChangeLog version

* Correct ChangeLog

* Remove GITHUB_TOKEN input

* Revert "Remove GITHUB_TOKEN input"

This reverts commit e868a8d3f4b753f758b4b2bd25aef78e4d4d62d7.

* Use COMMENT_PAT for GITHUB_TOKEN

* Use default permissions

* Only use `sticky-pull-request-comment` for internal PRs

* Update ChangeLog
This commit is contained in:
Nick Bolton
2024-08-23 10:38:17 +01:00
committed by GitHub
parent 19ecbd379d
commit 13bf2dace4
6 changed files with 12 additions and 21 deletions

View File

@ -1,11 +1,6 @@
name: "Run tests (setup)"
description: "Sets up the PR comment for tests"
inputs:
GITHUB_TOKEN:
description: "The GitHub token to use for authentication"
required: true
runs:
using: "composite"
@ -19,8 +14,8 @@ runs:
- name: Begin PR comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event.pull_request.head.repo.full_name == github.repository
with:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
header: tests
recreate: true
message: |
@ -30,8 +25,8 @@ runs:
# Neccesary since the first comment has an annoying comment.
- name: Append table header
uses: marocchino/sticky-pull-request-comment@v2
if: github.event.pull_request.head.repo.full_name == github.repository
with:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
header: tests
append: true
message: |

View File

@ -2,10 +2,6 @@ name: "Run tests"
description: "Runs both unit tests and integration tests and appends to a PR comment"
inputs:
GITHUB_TOKEN:
description: "The GitHub token to use for authentication"
required: true
job:
description: "The job name to append to the PR comment"
default: "unknown"
@ -51,8 +47,8 @@ runs:
- name: Append to PR comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event.pull_request.head.repo.full_name == github.repository
with:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
header: tests
append: true
message: |

View File

@ -19,7 +19,7 @@ on:
release:
types: [published]
schedule:
- cron: "0 5 * * *"
- cron: "0 5 * * *" # 5am UTC
env:
GIT_SHA: ${{ github.sha }}
@ -43,8 +43,6 @@ jobs:
uses: actions/checkout@v4
- uses: ./.github/actions/run-tests-setup
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
windows:
name: ${{ matrix.target.name }}
@ -96,7 +94,6 @@ jobs:
uses: ./.github/actions/run-tests
timeout-minutes: 2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
job: ${{ matrix.target.name }}
- name: Package
@ -171,7 +168,6 @@ jobs:
uses: ./.github/actions/run-tests
timeout-minutes: 2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
job: ${{ matrix.target.name }}
- name: Package
@ -288,7 +284,6 @@ jobs:
uses: ./.github/actions/run-tests
timeout-minutes: 2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
job: linux-${{ matrix.distro.name }}
- name: Package

View File

@ -111,5 +111,4 @@ jobs:
-Dsonar.cfamily.threads=${{ env.CPU_CORE_COUNT }} \
-Dsonar.python.version=3.10
env:
SONAR_TOKEN: ${{secrets.SONAR_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -56,8 +56,8 @@ jobs:
- name: Append to PR comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event.pull_request.head.repo.full_name == github.repository
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
recreate: true
header: valgrind
message: |

View File

@ -1,3 +1,9 @@
# 1.16.0
Enhancements:
- #7448 Only add PR comments for internal PR
# 1.15.0
Enhancements: