Skip to content

Commit

Permalink
✨ feat(sak/github#license): Use PAT.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Mar 9, 2021
1 parent e06d5fe commit 778b51a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ def mark_as_read (thread_id, token=None):
return patch(url, token=token)


def license(license_template):
def license(license_template, token=None):
token = pat(token)
path = ("licenses", license_template)
return get(path)
return get(path, token=token)
4 changes: 2 additions & 2 deletions sak/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ def mark_as_read(thread_id, token=None):

print(lib.args.forward(lib.github.mark_as_read, locals()))

def license(license_template, key='body'):
license = lib.github.license(license_template)
def license(license_template, key='body', token=None):
license = lib.github.license(license_template, token=token)
output = license[key]
sys.stdout.write(output)

0 comments on commit 778b51a

Please sign in to comment.