Repository navigation
Add comment commands for closing/accepting advisories - #67
StanFromIreland wants to merge 2 commits into
Conversation
sethmlarson
left a comment
There was a problem hiding this comment.
High-level comment: do we remove the [ACCEPT] title hack now that we have a system that can't be controlled by reporters? Also, are we sure that MEMBER isn't an association that's afforded to all GHSA collaborators? If it is then we need to check against the PSRT members list instead.
| client=github.rest.security_advisories, | ||
| method="GET", | ||
| url=f"/repos/{owner}/{repo}/security-advisories/{ghsa_id}/comments", | ||
| params={"per_page": 100, "page": page}, |
There was a problem hiding this comment.
Is there a way we can use a sort to get the latest comment immediately? I know there aren't docs but maybe we can infer this from other APIs or cause an error intentionally to see if the error tells us what parameters are accepted?
There was a problem hiding this comment.
I tried, but I'm afraid I couldn't find anything to work. :'-(
Yes, based on the issue docs, and testing, for example:
|
Good point, I've removed it here. Although I'm leaving the close tags for a while, we can remove them in a follow-up. |
To start with this feature, let's add
!closeand!acceptcommands. This is a little more convenient than the current summary system, and it also lets us check whether the command issuer is a PSRT member (technically, to keep things simple, I'm just checking theauthor_associationas all organisation members and repository owners are trusted here).Once this is tested, we can tackle the other issues that depend on this, such as adding a command to add/remove collaborators.
And, of course, there isn't any documentation for this yet 🙃. As such, I based the design on the issue/PR comment API and some testing I did.