Add workflow to post a comment on stale PRs#222
Conversation
9a4dc63 to
86fb53d
Compare
| 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"] |
There was a problem hiding this comment.
Could you please clarify if this is accessible from the action?
There was a problem hiding this comment.
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.
86fb53d to
ff8ec64
Compare
|
Before we invent our own stale bot have we considered using the Github provided stale action? There are also other stale bot actions but it seems like a duplicative effort to come up with our own one that is also probably needing a lot of the features that the official action supports. |
|
I did not, thanks for the pointer. It does not have the logic to detect who should be pinged but that logic is probably not worth maintaining our own action for. Closing for now, may re-open if other people feel strongly about it. |
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)