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

Specify an (optional) private leaderboardId as input #3

Merged
merged 2 commits into from
Dec 2, 2021

Conversation

ImperiumMaximus
Copy link
Contributor

@ImperiumMaximus ImperiumMaximus commented Dec 2, 2021

This PR enriches the action by allowing to specify the Advent of Code private leaderboard ID to handle the scenario when a user has joined a private leaderboard created by another user (the private leaderboard id URL includes the id of the user that created the leaderboard).

The leaderboard ID input parameter is optional and if left blank it is defaulted to the userId, in order to maintain backwards compatibility.

Copy link
Owner

@k2bd k2bd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, this is a much needed addition! Got a couple README nits if that's OK, I'm also happy to do them instead

README.md Outdated
Comment on lines 58 to 71
### `leaderboardId`

**Optional**

Your Advent of Code leaderboard ID.
To get this, go to your Go to [leaderboard](https://adventofcode.com/2020/leaderboard/private) and press 'View'.
The leaderboard ID is at the end of the URL:

```
https://adventofcode.com/2021/leaderboard/private/view/(leaderboard ID)
```

If not provided it will be derived from the userId parameter

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could this be moved after the required fields, and adopt consistent text formatting with the other optional fields?

e.g.

### `tableMarker`

*Optional* - default `<!--- advent_readme_stars table --->`

Description...

@@ -44,6 +44,7 @@ jobs:
- uses: k2bd/advent-readme-stars@v1
with:
userId: 1234567
leaderboardId: 9876543
Copy link
Owner

@k2bd k2bd Dec 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: in the lines above, could the text "pasting in yout user ID instead of 1234567:" be replaced with "pasting in your user ID and leaderboard ID"?

@ImperiumMaximus
Copy link
Contributor Author

Hey, thanks for the feedbacks!
I've just pushed the changes to the README.md file as you suggested.
I think it should be fine now :)

@k2bd
Copy link
Owner

k2bd commented Dec 2, 2021

LGTM! Thanks a lot 👍

@k2bd k2bd merged commit 32202d6 into k2bd:main Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants