Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bot] Hide Old Comment On Push #266

Closed
XAMPPRocky opened this issue May 19, 2021 · 6 comments
Closed

[bot] Hide Old Comment On Push #266

XAMPPRocky opened this issue May 19, 2021 · 6 comments
Labels
area/build-tools Development tooling. area/meta Organisational matters. e.g. Governance, release cycles, etc. priority/low Issues that don't need to be addressed in the near term.

Comments

@XAMPPRocky
Copy link
Collaborator

Also would be nice if the GitHub bot hid its previous comment when you push to a PR.

Originally posted by @XAMPPRocky in #264 (comment)

@markmandel
Copy link
Contributor

😕 looks like the only way is through the GraphQL v4 client (we use the v3 client right now).

https://developer.github.com/v4/mutation/minimizecomment/

Which is a bit more tricky to get up and running.

Context: isaacs/github#1480

@markmandel markmandel added area/build-tools Development tooling. area/meta Organisational matters. e.g. Governance, release cycles, etc. labels May 19, 2021
@XAMPPRocky
Copy link
Collaborator Author

Can you send a raw http request with the Go GitHub client? (the official ones usually have something), you could hardcode the graphql query and just send it as the body to a post request.

@markmandel
Copy link
Contributor

markmandel commented May 19, 2021

Can you send a raw http request with the Go GitHub client? (the official ones usually have something), you could hardcode the graphql query and just send it as the body to a post request.

Doesn't look like it. Sounds like if we want to do this, I need to learn GraphQL a bit 😄 Not the worst thing - just a bit more complicated.

Golang v4 client: https://github.com/shurcooL/githubv4

Example: https://stackoverflow.com/a/47503127

@markmandel
Copy link
Contributor

Digging into this some more, it doesn't look particularly onerous. I just need to do some learning. The Golang library API surface seems pretty reasonable. Just a mental shift from doing things the REST way.

@XAMPPRocky XAMPPRocky added the priority/low Issues that don't need to be addressed in the near term. label Jul 5, 2021
@markmandel
Copy link
Contributor

Since it came up on Discord, here is where the bot code is:

https://github.com/googleforgames/quilkin/tree/main/build/ci/github-bot

@markmandel
Copy link
Contributor

So I'm pretty happy with how the bot is working with deleting old statuses! I've yet to want go back to a previous build.

So unless anyone objects, I'm happy to close this ticket!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. area/meta Organisational matters. e.g. Governance, release cycles, etc. priority/low Issues that don't need to be addressed in the near term.
Projects
None yet
Development

No branches or pull requests

2 participants