Skip to content

Fixed access issue when Publishing from PR in private repo. #1786

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 8 commits into from
Jun 17, 2025

Conversation

spetersenms
Copy link
Contributor

@spetersenms spetersenms commented Jun 16, 2025

When using the Pubish to Environment workflow, targeting a PR in a private repo, the flow will fail with a permission issue, as the Github token does not have access to read the PR and PR annotations.
I have updated the permissions of the workflow to allow the Github token to access these.

Issue #1787

@Copilot Copilot AI review requested due to automatic review settings June 16, 2025 09:52
@spetersenms spetersenms requested a review from a team as a code owner June 16, 2025 09:52
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses a permissions issue encountered during the Publish to Environment workflow when targeting a PR in a private repository. The changes update two workflow YAML files to grant additional read permissions required for accessing pull requests and checks.

  • Expanded permissions to include pull-requests: read and checks: read.
  • Applied the changes consistently across both repository configurations.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Templates/Per Tenant Extension/.github/workflows/PublishToEnvironment.yaml Added pull-requests and checks permissions for private repo PR access
Templates/AppSource App/.github/workflows/PublishToEnvironment.yaml Mirrored permission updates to support enhanced access for the workflow

mazhelez
mazhelez previously approved these changes Jun 16, 2025
@spetersenms spetersenms merged commit a9d3f75 into microsoft:main Jun 17, 2025
5 checks passed
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.

3 participants