Skip to content

Commit c18e870

Browse files
committed
update dockerfile
1 parent a5ab7e7 commit c18e870

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM python:3.7-alpine
2-
#FROM python:3.7-slim
1+
FROM python:3.9-alpine
2+
#FROM python:3.9-slim
33

44
WORKDIR /app
55

hooks/example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def create_github_issue(title, body=None, labels=None):
3030
:return:
3131
"""
3232
# Our url to create issues via POST
33-
url = 'https://api.github.com/repos/%s/%s/issues' % (REPO_OWNER, REPO_NAME)
33+
url = f'https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/issues'
3434
# Create an authenticated session to create the issue
3535
session = requests.Session()
3636
session.auth = (USERNAME, API_KEY)
@@ -48,14 +48,14 @@ def create_github_issue(title, body=None, labels=None):
4848

4949

5050
if __name__ == '__main__':
51-
with open(sys.argv[1], 'r') as jsp:
51+
with open(sys.argv[1]) as jsp:
5252
payload = json.loads(jsp.read())
5353
action = payload['action']
5454
repo = payload['repository']['full_name']
5555
if action == 'deleted':
5656
create_github_issue('%s was deleted' % repo, 'Seems we\'ve got ourselves a bit of an issue here.\n\n@<user>',
5757
['deleted'])
5858

59-
outfile = '/tmp/webhook-{}.log'.format(repo)
59+
outfile = f'/tmp/webhook-{repo}.log'
6060
with open(outfile, 'w') as f:
6161
f.write(json.dumps(payload))

0 commit comments

Comments
 (0)