UQComputingSociety / uqcsbot-slack

:mortar_board: UQCSbot: our friendly little Slack bot
https://slack.uqcs.org.au
MIT License
55 stars 44 forks source link

[WIP] Add '!advent' command #397

Closed ldgrp closed 3 years ago

ldgrp commented 5 years ago

A session id is required to access the Advent of Code private leaderboard. I think uqcsbot should have its own account just so it can have access to the API.

Any ideas?

ldgrp commented 5 years ago

screenshot image

ldgrp commented 5 years ago

^ oops :open_mouth:

ldgrp commented 5 years ago

Thanks for the feedback @nicklambourne. I think i've incorporated most of the changes requested except for having the Leaderboard URL in a config file and maybe a better usage docstring.

nicklambourne commented 5 years ago

@ldgrp for some reason the environment variables aren't getting picked up in the tests. Will have to look into the cause. Any idea @TRManderson ?

TRManderson commented 5 years ago

The issue is likely the quotation marks in the env var string - I have removed these. Also, I think having the env var set for tests is a bad idea - we should instead mock the request.

Right now the session ID is public on Jenkins because it was inserted into the test run.

nicklambourne commented 5 years ago

@ldgrp I agree with @TRManderson, we can just provide mock input for the test and avoid the underlying issue. Sorry this has taken so long to address, did you want to amend the test? Might also be worth amending the cron to only run until the 25th December 😂.

nicklambourne commented 4 years ago

Interest in this seems to have flagged, closing for now.

katrinafyi commented 3 years ago

I'll restart work on this. Hopefully it gets merged soon before it becomes irrelevant for another year.

katrinafyi commented 3 years ago

Closing again in favour of #558. Many thanks for your work.