Allow MauiBot to trigger docs-from-code workflow#3341
Conversation
MauiBot only has read permission on this repo, which causes the pre_activation permission check to fail. Add MauiBot as an allowed actor so issues it creates with '[maui-labs docs]' in the title proceed to the agent job without requiring write access. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The if conditions check github.event.issue.title which doesn't exist when triggered via workflow_dispatch, causing all jobs to be skipped. Add github.event_name == 'workflow_dispatch' as an alternative condition. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 2b877f3: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit fa54836: ✅ Validation status: passed
For more details, please refer to the build report. |
Problem
The 'Docs from Create Draft PR' workflow fails when triggered by MauiBot opening an issue because MauiBot only has
readpermission on this repo. Thepre_activationjob's permission check requiresadmin,maintainer, orwrite, so all subsequent jobs get skipped.CodeSee: https://github.com/dotnet/docs-maui/actions/runs/25920414126
Fix
Add
github.actor == 'MauiBot'as an alternative condition in theactivatedoutput. This allows MauiBot-triggered issues to proceed to the agent job without requiring write access, while still enforcing the permission check for all other users.Alternative considered
Granting MauiBot write access at the org level would also fix this but requires org admin involvement.