Repository navigation
fix: add variables:read permission for per-repo guard check - #995
Conversation
The FULLSEND_PER_REPO_INSTALL guard (PR #967) fails in reconcile workflows because the fullsend role token lacks the variables:read fine-grained permission. The GET /repos/{owner}/{repo}/actions/variables endpoint returns 403, causing all repos to be skipped. - Add Variables field to AppPermissions struct and fullsend App manifest - Add variables:read to fullsend role in mint rolePermissions - Fix misleading "actions:read" error message in enrollment analyzer - Include API error message in reconcile-repos.sh warning output Signed-off-by: Wayne Sun <gsun@redhat.com>
|
fullsend review is working on this — view logs |
Site previewPreview: https://c76eb73d-site.fullsend-ai.workers.dev Commit: |
Review: #995Head SHA: b139d9d SummaryClean, well-scoped bug fix that adds the missing FindingsCritical(none) High(none) Medium(none) Low
Info
FooterOutcome: approve Previous runReview: #995Head SHA: 21832c8 SummaryClean, well-scoped fix that adds FindingsMedium
FooterOutcome: comment-only |
Fix stale 'actions:read' error message in admin.go to correctly say 'variables:read', matching the fix in enrollment.go. Add missing test assertion for Variables permission in TestAgentAppConfig_Fullsend. Signed-off-by: Wayne Sun <gsun@redhat.com>
|
fullsend review is working on this — view logs |
Summary
FULLSEND_PER_REPO_INSTALLguard introduced in feat: add FULLSEND_PER_REPO_INSTALL guard variable #967 fails in reconcile workflows because thefullsendrole token lacks thevariables:readfine-grained permissionGET /repos/{owner}/{repo}/actions/variables/{name}returns 403 ("You must have the repository variables fine-grained permission"), causingcheck_per_repo_guardto skip every repoEnrolled: 0, Unenrolled: 0, Skipped: 2, Failed: 0Changes
internal/forge/github/types.go— AddVariablesfield toAppPermissionsstruct; addVariables: "read"tofullsendApp manifestinternal/mint/main.go— Add"variables": "read"tofullsendrole inrolePermissionsinternal/layers/enrollment.go— Fix error message:actions:read→variables:readinternal/scaffold/fullsend-repo/scripts/reconcile-repos.sh— Include API error message in warning output for easier debuggingDeployment note
After merging, existing
fullsend-fullsendGitHub Apps need the newvariables: readpermission approved.fullsend admin install --analyzewill flag this automatically. After updating App permissions in GitHub settings and re-approving, re-deploy the mint Cloud Function so the newrolePermissionstake effect.Test plan
go test ./internal/layers/...— passgo test ./internal/forge/github/...— passgo test ./internal/mint/...— pass (separate module)