kubernetes / test-infra

Test infrastructure for the Kubernetes project.
Apache License 2.0
3.81k stars 2.61k forks source link

Add GitHub AppID and key authentication to commenter bot #32805

Open tnozicka opened 2 weeks ago

tnozicka commented 2 weeks ago

What would you like to be added: I'd like to extend the commenter robot flags, so it can be used with GitHub AppID credentials.

(I understand that GitHub apps can authenticate only for a single installation ID, so the queries will be limited to single org, if such authentication option is used.)

Why is this needed: The commenter robot accepts only GH token for authentication. This is problematic because it needs a real GH user which will incur additional cost for organizations. More importantly, I have tried creating such account and generating long-lived access token for it in "Developer options" but even with --ceiling=10 and the job run every hour, it got flagged by GitHub after the first run(s) which made its comments invisible to anyone else. My hope it using the GitHub App avoids these bans and is similar to native GitHub workflows that get the automatic token.

/assign

tnozicka commented 2 weeks ago

/sig testing