Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Check your progress on [Hacktoberfest](https://hacktoberfest.digitalocean.com/)
![@leereilly's Hacktoberfest contributions as of 1475644816](https://cloud.githubusercontent.com/assets/121322/19101908/aebbdb62-8a80-11e6-8321-72fcc1dd5eb6.png)

## Installation
* Requires Python 3.6
* Clone this repo `git clone https://github.com/Thor77/HacktoberfestProgress`
* Install dependencies `pip3 install -r requirements.txt`
* Modify `config.py` to suit your needs (you **have to** set `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET`)
* Run the application `python3 main.py`
* Install dependencies `pip install -r requirements.txt`
* Modify `config.py` to suit your needs (you **have to** set `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET`) [Get yours here](https://github.com/settings/developers "Github developers page")

* Run the application `python3.6 main.py`
3 changes: 3 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

SECRET_KEY = 'N{5K$:6}6>!Y$BxKYBl9gA"*W5&(0X;Xo[Gh)%?Ci@l!EHL]$j4%:Bs'
SESSION_TYPE = 'filesystem'

GITHUB_CLIENT_ID = 'your_client_id'
GITHUB_CLIENT_SECRET = 'your_client_secret'
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

api_base = 'https://api.github.com'

auth_url = 'https://github.com/login/oauth/authorize'\
'?client_id={}'.format(client_id)
auth_url = f'https://github.com/login/oauth/authorize'\
'?client_id={client_id}'

time_range = '2017-10-01T00:00:01Z..2017-10-31T23:59:59'
search_query = 'type:pr+created:' + time_range + '+author:{}'
Expand All @@ -36,7 +36,7 @@ def headers(token):
Build authentication-headers with `token`
'''
return {
'Authorization': 'token {}'.format(token),
'Authorization': f'token {token}',
'User-Agent': 'HacktoberfestProgress/Thor77'
}

Expand Down