You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Harden APM auth: also set GITHUB_APM_PAT when github-app is configured #23148
We identified and fixed a token shadowing bug in apm-action v1.4.0 that broke dependencies.github-app users (see microsoft/apm-action#21). The root cause was apm-action auto-setting GITHUB_APM_PAT to the default ${{ github.token }}, which shadowed the GitHub App token that gh-aw places in GITHUB_TOKEN.
The apm-action fix (only setting GITHUB_APM_PAT when GITHUB_TOKEN is not already present) resolves the issue. However, gh-aw can add a belt-and-suspenders defense so it is resilient to any future apm-action token-forwarding changes.
What to do
In pkg/workflow/apm_dependencies.go, GenerateAPMPackStep(), when github-app is configured, also emit GITHUB_APM_PAT alongside GITHUB_TOKEN:
APM CLI's token resolution precedence for module downloads is:
GITHUB_APM_PAT > GITHUB_TOKEN > GH_TOKEN
By explicitly setting GITHUB_APM_PAT to the App token, gh-aw ensures the correct token wins regardless of what apm-action does with its default github-token input. This makes gh-aw self-contained and not dependent on apm-action's internal token-forwarding behavior.
Activity
fix: allow auto-triage to label community issues by setting min-integ…
fix(auto-triage): add community and cookie approval-labels and centra…