This tool can be used to generate a Markdown File containing the last 7 days of closed pull requests for the roirevolution
organization.
- Clone the repo
- Fetch dependencies
mix deps.get
- Build the escript
mix escript.build
You will need a Github access token that has access to the organization you are fetching pull request information for.
You can generate this token in your Github setting.
This access_token
is accessed via an environmental variable. You can export
it or specify it when running the script.
# Set the environmental variable
export GITHUB_ACCESS_TOKEN="MY_TOKEN"
./weekly_summary ORGANIZATION_NAME
# Set at run time
GITHUB_ACCESS_TOKEN=MY_TOKEN ./weekly_summary ORGANIZATION_NAME
By default, the last 7 days of closed Pull Requests will be fetched. This can be customized with the --num-days
argument.
# last 7 days
./weekly_summary ORGANIZATION_NAME
# yesterday
./weekly_summary --num-days 1 ORGANIZATION_NAME
# last 30 days
./weekly_summary --num-days 30 ORGANIZATION_NAME
You can also specify the start-date
and end-date
. Dates are expected to be in the format YYYYMMDD
. If you only include start-date
the end-date
is today.
# start date is 2018-01-01
# end date is today
./weekly_summary --start-date 20180101 ORGANIZATION_NAME
# start date is 2017-12-25
# end date is 2017-01-31
./weekly_summary --start-date 20171225 --end-date 20170131 ORGANIZATION_NAME
By default, the Weekly Summary is printed to stdout
. This script is most useful to run and redirect ourput to a file
./weekly_summary > this_week.md