-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Gaurab/manual pr build 3 #21044
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
base: develop
Are you sure you want to change the base?
Gaurab/manual pr build 3 #21044
Conversation
✅ Deploy Preview for docs-website-netlify canceled.
|
Hi @gmanandhar-nr 👋 Thanks for your pull request! Your PR is in a queue, and a writer will take a look soon. We generally publish small edits within one business day, and larger edits within three days. We will automatically generate a preview of your request, and will comment with a link when the preview is ready (usually 10 to 20 minutes). |
netlify build |
netlify build |
runs-on: ubuntu-latest | ||
# if: github.event.issue.pull_request && contains(github.event.comment.body, 'netlify build') | ||
steps: | ||
- name: Check for member permission | ||
id: check_permission | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
echo 'Running the check for member permission step Gaurab' | ||
# const commenter = context.payload.comment.user.login; | ||
# const org = context.repo.owner; | ||
# const team_slug = 'DOCS-ENG'; // ** CHANGE THIS TO YOUR TEAM'S SLUG ** | ||
# try { | ||
# const { data: teams } = await github.rest.teams.listForAuthenticatedUser({ | ||
# org: org, | ||
# }); | ||
# const isMember = teams.some(team => team.slug === team_slug); | ||
# if (!isMember) { | ||
# core.setFailed('User is not a member of the required team.'); | ||
# return; | ||
# } | ||
# const { data: userTeams } = await github.rest.teams.listMembersInOrg({ | ||
# org, | ||
# team_slug, | ||
# }); | ||
# const isTeamMember = userTeams.some(member => member.login === commenter); | ||
# if (!isTeamMember) { | ||
# core.setFailed('User is not a member of the required team.'); | ||
# } | ||
# } catch (error) { | ||
# core.setFailed(`Could not verify team membership: ${error.message}`); | ||
# } | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Trigger Netlify Deploy | ||
# if: steps.check_permission.outcome == 'success' | ||
# run: | | ||
# curl -X POST -d '{}' "${{ secrets.NEW_NETLIFY_BUILD_HOOK }}"?trigger_branch=${{ github.event.issue.pull_request.head.ref }}&trigger_title=Deploy+preview+for+PR+%23${{ github.event.issue.number }}+by+${{ github.actor }} |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 days ago
To fix the issue, we need to add a permissions
block to the workflow. This block should specify the least privileges required for the workflow to function correctly. Based on the workflow's operations, the contents: read
permission is sufficient for accessing repository data, and no write permissions are needed. The permissions
block can be added at the root level of the workflow to apply to all jobs.
-
Copy modified lines R3-R5
@@ -2,2 +2,5 @@ | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: |
netlify build |
4 similar comments
netlify build |
netlify build |
netlify build |
netlify build |
⏳ Netlify Preview Deployment InformationThis comment will auto update when your preview build is ready |
Please follow conventional commit standards
in your commit messages and pull request title.
Give us some context
links to related docs, screenshots, etc.