forked from OptimaiNetwork/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
LunaroptAI2 #6
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
Merged
Merged
LunaroptAI2 #6
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
44610a2
Remove the EthicalCheck action step from the workflow
KalCola 0795f25
Update node.js.yml
KalCola e6db7cd
Potential fix for code scanning alert no. 3: Workflow does not contai…
KalCola 79c6abc
Delete .github/workflows/ethicalcheck.yml
KalCola 1b4ecd3
Potential fix for code scanning alert no. 5: Workflow does not contai…
KalCola a96a353
Create npm-publish-github-packages.yml
KalCola d44e0d2
Create stale.yml
KalCola 6d6fa1e
Update package-lock.json
KalCola 2354cfa
Potential fix for code scanning alert no. 6: Workflow does not contai…
KalCola 99a54af
Merge branch 'KalCola-patch-1' into main
KalCola File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
| # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | ||
|
|
||
| name: Node.js Package | ||
|
|
||
| on: | ||
| release: | ||
| types: [created] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| - run: npm ci | ||
| - run: npm test | ||
|
|
||
| publish-gpr: | ||
|
||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| registry-url: https://npm.pkg.github.com/ | ||
| - run: npm ci | ||
| - run: npm publish | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions
Copilot Autofix
AI 13 days ago
In general, the fix is to explicitly declare a restrictive
permissionsblock for the workflow or for the individual job, rather than relying on repository/organization defaults. For a simple CI workflow that only checks out code and runs builds/tests,contents: readis typically sufficient and matches the minimal access CodeQL suggests.The best fix here is to add a root-level
permissionsblock right under the workflow name (or underon:) so it applies to all jobs that don’t override it. Since thebuildjob only usesactions/checkoutand runs local Node.js commands (npm ci,npm run build,npm test) and does not interact with issues, PRs, or packages, it only needs read access to repository contents. Concretely, in.github/workflows/node.js.yml, add:near the top of the file, without changing any existing steps or behavior. No additional imports or methods are needed, as this is purely a YAML configuration change.