Skip to content

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Conversation

gmanandhar-nr
Copy link
Member

Please follow conventional commit standards
in your commit messages and pull request title.

Give us some context

  • What problems does this PR solve?
  • Add any context that will help us review your changes such as testing notes,
    links to related docs, screenshots, etc.
  • If your issue relates to an existing GitHub issue, please link to it.

@gmanandhar-nr gmanandhar-nr requested a review from a team as a code owner June 27, 2025 15:47
Copy link

netlify bot commented Jun 27, 2025

Deploy Preview for docs-website-netlify canceled.

Name Link
🔨 Latest commit 58db7ab
🔍 Latest deploy log https://app.netlify.com/projects/docs-website-netlify/deploys/685ec0ce80af260009b28dfa

Copy link

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).

@gmanandhar-nr
Copy link
Member Author

netlify build

@gmanandhar-nr
Copy link
Member Author

netlify build

Comment on lines +10 to +48
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

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

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.

Suggested changeset 1
.github/workflows/gaurab-manual-preview-deploy.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/gaurab-manual-preview-deploy.yml b/.github/workflows/gaurab-manual-preview-deploy.yml
--- a/.github/workflows/gaurab-manual-preview-deploy.yml
+++ b/.github/workflows/gaurab-manual-preview-deploy.yml
@@ -2,2 +2,5 @@
 
+permissions:
+  contents: read
+
 on:
EOF
@@ -2,2 +2,5 @@

permissions:
contents: read

on:
Copilot is powered by AI and may make mistakes. Always verify output.
@gmanandhar-nr
Copy link
Member Author

netlify build

4 similar comments
@gmanandhar-nr
Copy link
Member Author

netlify build

@gmanandhar-nr
Copy link
Member Author

netlify build

@gmanandhar-nr
Copy link
Member Author

netlify build

@gmanandhar-nr
Copy link
Member Author

netlify build

Copy link

Netlify Preview Deployment Information

This comment will auto update when your preview build is ready

@WriteMayur WriteMayur added the eng issues related to site functionality that requires engineering label Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eng issues related to site functionality that requires engineering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants