Browse Source

Add headers to fix GHA workflows (#28)

pull/29/head
Micaiah Martin 4 years ago committed by GitHub
parent
commit
6f6ac44e93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      lint-workflow/lint.py

6
lint-workflow/lint.py

@ -11,10 +11,14 @@ def get_action_update(action_id): @@ -11,10 +11,14 @@ def get_action_update(action_id):
and checks the action repo for the newest version.
If there is a new version, return the url to the updated version.
"""
if "." in action_id:
# Handle local workflow calls, return None since there will be no updates.
return None
path, *hash = action_id.split("@")
http = urllib.PoolManager()
headers = {}
headers = {"user-agent": "bw-linter"}
if os.getenv("GITHUB_TOKEN", None):
headers["Authorization"] = f"Token {os.environ['GITHUB_TOKEN']}"

Loading…
Cancel
Save