Skip to content

Add pull-requests: read permission to staging-lint-checks workflow#829

Merged
mikeharder merged 2 commits intoakhilailla/test_testfrom
copilot/sub-pr-823
Feb 23, 2026
Merged

Add pull-requests: read permission to staging-lint-checks workflow#829
mikeharder merged 2 commits intoakhilailla/test_testfrom
copilot/sub-pr-823

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

When a workflow declares explicit permissions, all unspecified scopes default to none. The staging-lint-checks workflow only declared contents: read, causing GITHUB_TOKEN to lack pull-requests: read — leading to 403 failures when the embedded script calls github.rest.pulls.listFiles to detect rule changes.

Changes

  • .github/workflows/staging-lint-checks.yaml: Add pull-requests: read to the top-level permissions block
permissions:
  contents: read
  pull-requests: read  # required for github.rest.pulls.listFiles

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copilot AI changed the title [WIP] Update staging-lint-check workflow based on feedback Add pull-requests: read permission to staging-lint-checks workflow Feb 23, 2026
Copilot AI requested a review from mikeharder February 23, 2026 19:43
@mikeharder mikeharder marked this pull request as ready for review February 23, 2026 20:09
@mikeharder mikeharder merged commit 82bf01a into akhilailla/test_test Feb 23, 2026
7 checks passed
@mikeharder mikeharder deleted the copilot/sub-pr-823 branch February 23, 2026 20:09
AkhilaIlla added a commit that referenced this pull request Mar 9, 2026
* Log the error for autorest failures

* Fix sparse checkout error

* Update staging-lint-check workflow to block PR merge upomn failure

* Fix unused import linter error in extract-rule-names test (#828)

* Initial plan

* Remove unused hasLabel import to fix linter error

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>

* Add pull-requests: read permission to staging-lint-checks workflow (#829)

* Initial plan

* Add pull-requests: read permission to staging-lint-checks workflow

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>

* Fix Prettier formatting in staging lint check workflow files (#830)

* Initial plan

* Fix prettier formatting in README and test file

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Minor updates

* Update inline docs to be in sync with the method ddoc

---------

Co-authored-by: akhilailla <akhilailla@microsoft.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Co-authored-by: Mike Harder <mharder@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants