Skip to content

Support full role permission checks - #103

Open
Pybsama wants to merge 1 commit into
github:mainfrom
Pybsama:codex/fix-maintain-role-permission
Open

Support full role permission checks#103
Pybsama wants to merge 1 commit into
github:mainfrom
Pybsama:codex/fix-maintain-role-permission

Conversation

@Pybsama

@Pybsama Pybsama commented Jul 30, 2026

Copy link
Copy Markdown

Summary

  • match the full collaborator role_name as well as the legacy base permission
  • allow maintain-only configurations to distinguish maintainers from ordinary writers
  • preserve existing write/admin compatibility, document the behavior, and rebuild the Action bundle

This intentionally matches either API field: GitHub maps maintain to write and triage to read in the legacy permission field, so replacing that field outright would break existing base-permission configurations.

Tests

  • npm run test — 12 suites, 106 tests, 100% line coverage
  • npm run all
  • npm run format-check

Fixes #101

@Pybsama

Pybsama commented Aug 31, 2026

Copy link
Copy Markdown
Author

Revalidated this PR against current main on 2026-08-31:

  • Upstream main is still 3442f3fa; the public PR head is b592cf04, and GitHub's synthetic merge tree exactly matches the tested head tree (f4e2697b).
  • RED check: restoring the original base-permission-only implementation produces 4 failures and 9 passes in the 13 authorization tests, covering maintain, triage, custom roles, and the full-role diagnostic.
  • GREEN check: 13/13 authorization tests pass, including 50 consecutive focused runs.
  • Node 22.13.1 / npm 10.9.2: 12/12 suites and 106/106 tests pass. Statements, functions, and lines are 100%; valid-permissions.js also has 100% branch coverage.
  • Prettier, ESLint, npm run all, git diff --check, and Node syntax validation of the committed bundle pass.
  • Two clean ncc rebuilds produced byte-identical dist/index.js, source map, and license hashes with no repository diff.
  • The workflow-pinned json-yaml-validate commit validates all four repository JSON files and action.yml against the repository schema.
  • Semgrep ran 68 JavaScript rules over the changed source and tests with 0 findings.

npm test also completes all 106 tests, but the currently locked badge generator rewrites styling in the existing coverage SVG. This PR changes neither the badge nor dependencies, so I restored that unrelated generated-file drift; the CI test workflow uses npm run ci-test.

With the implementation, bundle, and current merge tree verified, I am marking this PR ready for review.

@Pybsama
Pybsama marked this pull request as ready for review August 31, 2026 05:20
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.

"maintain" cannot be used to verify actor permissions

1 participant