-
-
Notifications
You must be signed in to change notification settings - Fork 558
fix(ci): Update workflows to use release pipeline #807
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
Conversation
Signed-off-by: Dan Webb <[email protected]>
Slowest examplesTop 10 slowest examples (0.01 seconds, 48.59% of total time)
|
|
|
||
| jobs: | ||
| conventional-commits: | ||
| uses: sous-chefs/.github/.github/workflows/[email protected] |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To fix the problem, you should add a permissions: block to your workflow file, either at the root level or for each relevant job. In general, the root-level permissions: block applies the restrictions to all jobs unless they have their own. Since your workflow only shows one job and is calling a reusable workflow, the best approach is to set the minimal permissions required at the root of .github/workflows/conventional-commits.yml. Unless you know that the sous-chefs/.github/.github/workflows/[email protected] workflow requires write access for certain scopes (such as creating or updating pull requests), you should start with the most restrictive setup, usually contents: read. If the workflow does update pull requests or issues, you may need to add, for example, contents: read and pull-requests: write. The fix is to insert the permissions: block after the name: field and before the on: field (lines 2–4), matching GitHub Actions conventions.
-
Copy modified lines R3-R4
| @@ -1,5 +1,7 @@ | ||
| --- | ||
| name: conventional-commits | ||
| permissions: | ||
| contents: read | ||
|
|
||
| "on": | ||
| pull_request: |
| uses: sous-chefs/.github/.github/workflows/[email protected] | ||
| secrets: | ||
| token: ${{ secrets.GITHUB_TOKEN }} |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To fix the problem, add a permissions block to the workflow file, specifying the minimum permissions required for the workflow to perform its tasks. Since the workflow wraps a reusable workflow that handles "prevent file change" operations on pull requests, it's prudent to start with contents: read for basic read access, unless the underlying reusable workflow requires more. The block should be placed at the root level (top-level, after name: and before on:), making it apply to all jobs unless overridden.
The change is:
- Insert the following after the
name: prevent-file-changeline and before the"on":block:permissions: contents: read
- No new imports, definitions, or methods are required for YAML workflows.
-
Copy modified lines R3-R4
| @@ -1,5 +1,7 @@ | ||
| --- | ||
| name: prevent-file-change | ||
| permissions: | ||
| contents: read | ||
|
|
||
| "on": | ||
| pull_request: |
Updates workflows to @5.0.3.
Changes
Webhooks