Skip to content

Conversation

@ahoppen
Copy link
Member

@ahoppen ahoppen commented Jan 10, 2026

To help repository owners ensure that all PRs get reviewed and to ensure that open PRs get merged in a timely manner, add a GitHub workflow that posts comments on all PRs that haven’t been modified for a given number of weeks.

Example run: https://github.com/ahoppen/swift-format/actions/runs/20879906927/job/59994655300, produced the following comment: ahoppen/swift-format#2 (comment)

@ahoppen ahoppen requested a review from a team as a code owner January 10, 2026 14:45
Comment on lines +53 to +58
def user_has_write_access(user: str) -> bool:
output = subprocess.check_output(
["gh", "api", f"repos/{repo}/collaborators/{user}/permission"],
encoding="utf-8"
)
return json.loads(output)["permission"] in ["write", "push", "admin"]
Copy link
Member

Choose a reason for hiding this comment

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

Could you please clarify if this is accessible from the action?

Copy link
Member Author

Choose a reason for hiding this comment

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

It’s got to be because my test run https://github.com/ahoppen/swift-format/actions/runs/20879906927/job/59994655300 passed and I would have gotten a KeyError if permission didn’t exist in the JSON.

To help repository owners ensure that all PRs get reviewed and to ensure that open PRs get merged in a timely manner, add a GitHub workflow that posts comments on all PRs that haven’t been modified for a given number of weeks.
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.

2 participants