Skip to content

Run a raffle among the 🌟 stargazers 🌟 of a Github project!

License

Notifications You must be signed in to change notification settings

gvolpe/stargazers-raffle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

stargazers-raffle

Run a raffle among the 🌟 stargazers 🌟 of a Github project!

Overview

It is designed to run directly on Github actions but it can also be used locally on your command line. The CI build is configured with the repository we want the raffle to run against. Once completed, the winner will be listed as a comment of this issue in the following way.

ℹ️ 14 requests made to Github API ℹ️

πŸ† πŸ† πŸ† @username πŸ† πŸ† πŸ†

Run it locally

You need to have a JDK and scala-cli installed, or you can use the given Nix shell.

The following command makes a binary named raffle.

$ nix-shell
$ scala-cli package . -o raffle -f

Run the raffle binary passing two arguments: author and repo name.

$ ./raffle
Missing expected positional argument!

Usage: stargazers-raffle [] [--show-all-users] <author> <repo>

Stargazers Raffle

Options and flags:
    --help
        Display this help text.
    --version, -v
        Print the version number and exit.
    --show-all-users, -s
        Display all the stargazers before raffle
    --post-winner
        Post the winner on the designated Github issue

Environment Variables:
    GH_TOKEN=<string>
        Github personal access token

For example.

$ ./raffle gvolpe dconf2nix --post-winner
ℹ️ 2 requests made to Github API ℹ️

πŸ†πŸ†πŸ† @username πŸ†πŸ†πŸ†

 * from 50 🌟 stargazers of https://github.com/gvolpe/dconf2nix!

βœ”οΈ Done. See https://github.com/gvolpe/stargazers-raffle/issues/1

About

Run a raffle among the 🌟 stargazers 🌟 of a Github project!

Resources

License

Stars

Watchers

Forks