rust-lang / crater

Run experiments across parts of the Rust ecosystem!
https://crater.rust-lang.org
629 stars 88 forks source link

Show run stats in the GitHub message #249

Closed pietroalbini closed 5 years ago

pietroalbini commented 6 years ago

Mentoring instructions

When craterbot sends the GitHub message announcing to the world an experiment is completed, it should also include some stats from the run, for example the number of regressions.

zacps commented 5 years ago

I'd be interested in adding this, any tips for where to start?

pietroalbini commented 5 years ago

Thanks for your interest!

The message is sent after the report is generated, so you need to add a line there showing the number of regressed crates. In order to do that, the easiest way is to return the res variable from the reports::gen function, and iterate over it to count the number of regressed crates.

If you have any trouble feel free to ask here or on the #crater channel on the Rust Discord (I won't be online a lot this weekend though).

zacps commented 5 years ago

I've added what I think needs to be added but I'm having a little bit of trouble getting the crater bot setup.

When trying to run the agent I get Invalid authorization token provided.

If I have a bot account with the username crater-test-bot and an access token 12345, what should the config and run command look like?

pietroalbini commented 5 years ago

You need to put your bot's API token in the api-token field of tokens.toml (along with the secret you used in the GitHub webhook in webhooks-secret). Please join Discord if you have more trouble though!

pietroalbini commented 5 years ago

Hi @zacps! Has there been any progress on this? Do you need some help?

zacps commented 5 years ago

Sorry, I've just gotten pretty busy as it's getting around to exam season here. If anyone else wants to pick this up they can go ahead.

zeegomo commented 5 years ago

I will give this a try