ci: GitHub action for code linting #6
7
.github/workflows/conventional-commits.yml
vendored
7
.github/workflows/conventional-commits.yml
vendored
@ -4,10 +4,17 @@ on:
|
||||
pull_request:
|
||||
types: [ opened, synchronize, reopened, edited ]
|
||||
|
||||
permissions: { }
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: conventional commits
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
packages: read
|
||||
statuses: write
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
@ -4,10 +4,17 @@ on:
|
||||
pull_request:
|
||||
types: [ opened, synchronize, reopened, edited ]
|
||||
|
||||
permissions: { }
|
||||
|
||||
![]() Define explicit permissions for security. The addition of an empty
Committable suggestion
**Define explicit permissions for security.**
The addition of an empty `permissions` block at the top level is unnecessary since specific permissions are already defined within the `build` job. Consider removing it to avoid confusion.
```diff
- permissions: { }
```
<!-- suggestion_start -->
<details>
<summary>Committable suggestion</summary>
> :bangbang: **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
`````suggestion
`````
</details>
<!-- suggestion_end -->
<!-- This is an auto-generated comment by CodeRabbit -->
|
||||
jobs:
|
||||
build:
|
||||
name: conventional pull requests
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
packages: read
|
||||
statuses: write
|
||||
steps:
|
||||
- name: conventional pull requests check
|
||||
uses: ytanikin/PRConventionalCommits@1.1.0
|
||||
|
1
.github/workflows/lint.yml
vendored
1
.github/workflows/lint.yml
vendored
@ -12,6 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
packages: read
|
||||
statuses: write
|
||||
steps:
|
||||
|
Loading…
x
Reference in New Issue
Block a user
Define explicit permissions for security.
The addition of an empty
permissions
block at the top level is unnecessary since specific permissions are already defined within thebuild
job. Consider removing it to avoid confusion.Committable suggestion