Skip to content

Conversation

@pakrym-oai
Copy link
Collaborator

@pakrym-oai pakrym-oai commented Nov 13, 2025

Tested on #3036

@pakrym-oai pakrym-oai changed the title Update close-stale-contributor-prs.yml Enable close-stale-contributor-prs.yml workflow Nov 13, 2025
@pakrym-oai pakrym-oai marked this pull request as ready for review November 13, 2025 19:20
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

let permission;
try {
const permissionResponse = await github.rest.repos.getCollaboratorPermissionLevel({
owner,
repo,
username: pr.user.login,
});
permission = permissionResponse.data.permission;
} catch (error) {
if (error.status === 404) {
core.info(`Author ${pr.user.login} is not a collaborator; skipping #${pr.number}`);
continue;
}
throw error;
}
const hasContributorAccess = ["admin", "maintain", "write"].includes(permission);
if (!hasContributorAccess) {
core.info(`Author ${pr.user.login} has ${permission} access; skipping #${pr.number}`);
continue;

P1 Badge Permission filter closes maintainers instead of contributors

Now that dryRun is false, the workflow will actually close the PRs selected by the filter below, but the filter only ever matches collaborators with admin/maintain/write access. Non-collaborator contributors hit the 404 in getCollaboratorPermissionLevel and are skipped, so the job never touches the very “contributor PRs” it is supposed to prune and instead auto-closes internal maintainer PRs after 14 idle days. That behavior was harmless while dry-run was true but becomes disruptive once the workflow runs for real.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pakrym-oai pakrym-oai merged commit c95bd34 into main Nov 13, 2025
25 checks passed
@pakrym-oai pakrym-oai deleted the pakrym-oai-patch-1 branch November 13, 2025 19:50
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants