Skip to content

Commit

Permalink
COMP: Fix commit-message workflow integration with private repository
Browse files Browse the repository at this point in the history
Updates the "pre-commit" workflow to ensure compatibility when
reused in a private repository by addressing pull request permissions.

The adjusted repository permissions allows to support the
`gsactions/commit-message-checker` action , which relies on GraphQL
requiring permission similar to the "Get a Pull Request" REST endpoint.

It fixes the following error encountered during testing, indicating a
permissions issue:

```
> Run GsActions/commit-message-checker@16fa2d5
> Error: GraphqlResponseError: Request failed due to following response errors:
> - Resource not accessible by integration
```

List of Slicer changes:

```
$ git shortlog 80a7735c1a..f2b79dcfcb --no-merges
Jean-Christophe Fillion-Robin (1):
      BUG: Update "pre-commit" workflow to support reuse from private project
```
  • Loading branch information
jcfr committed Aug 21, 2024
1 parent a48d8b1 commit 8fce0ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/commit-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ on:

permissions:
contents: read
pull-requests: read

jobs:
check-commit-message:
uses: Slicer/Slicer/.github/workflows/commit-message.yml@80a7735c1a419a31ec3131815efe77ad9e0a89f0 # main
uses: Slicer/Slicer/.github/workflows/commit-message.yml@f2b79dcfcbf628695607cfa68789d1c0143de2c0 # main
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ on:

permissions:
contents: read
pull-requests: read

jobs:
check-commit-message:
uses: Slicer/Slicer/.github/workflows/commit-message.yml@80a7735c1a419a31ec3131815efe77ad9e0a89f0 # main
uses: Slicer/Slicer/.github/workflows/commit-message.yml@f2b79dcfcbf628695607cfa68789d1c0143de2c0 # main

0 comments on commit 8fce0ee

Please sign in to comment.