-
Notifications
You must be signed in to change notification settings - Fork 1.3k
run prettier #994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run prettier #994
Conversation
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: npm | ||
|
||
- run: npm ci | ||
- run: npm run build | ||
- run: npm test | ||
- run: npm run lint | ||
|
||
publish: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 days ago
To fix this problem, add a minimal permissions
block to the build
job in the .github/workflows/main.yml
file, restricting the GITHUB_TOKEN permissions for that job to only what is required. Based on the steps in the build
job, no operations require write access to repository contents, so setting contents: read
will adhere to the principle of least privilege. Add the following block under the build:
job definition before the runs-on:
line:
permissions:
contents: read
No imports or additional method definitions are required. Only the YAML job configuration needs to be updated.
-
Copy modified lines R15-R16
@@ -12,6 +12,8 @@ | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
contents: read | ||
runs-on: ubuntu-latest | ||
|
||
steps: |
Run prettier after #976