Skip to content

[Bug]: Badges job fails for forked PRs #130

@msc365admin

Description

@msc365admin

Is there an existing issue for this?

  • I have searched the existing issues

PowerShell version

7.4

Azure.DevOps.PSModule version

0.4.0

Related function

GitHub Actions workflow: .github/workflows/pr-code-testing.yml - badges job

Input arguments of the related function

N/A - This is a workflow configuration issue

Debug output

N/A

Expected behavior

The badges job should only execute for pull requests originating from the same repository (internal PRs), not from forks (external/remote PRs). Fork PRs do not have access to repository secrets (GIST_TOKEN and GIST_ID) for security reasons and will fail.

Actual behavior

The badges job was configured to run for all pull requests where source changes were detected and the test job succeeded. This meant that pull requests from forked repositories could potentially trigger the badge publishing workflow, which would attempt to access repository secrets and fail.

Steps to reproduce

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions