Change authentication string
buildbot/multibuild_parent Build done. Details
buildbot/travis_bionic Build done. Details

- according to documentation, I'm supposed to prepend "token". However,
  swagger doesn't do that. They both do seem to work (i.e. they
  authenticate correctly), but adding "token " has a strange performance
  penalty.
This commit is contained in:
Peter Šurda 2024-04-15 18:30:39 +08:00
parent 83b9276375
commit 7bade8f3d5
Signed by: PeterSurda
GPG Key ID: 3E47497CF67ABB95
1 changed files with 1 additions and 2 deletions

View File

@ -20,8 +20,7 @@ def get_combined(token):
req = urllib.request.Request(GITEA_REPO_URL
+ f"/repos/issues/search?state=open&{q}=true")
req.add_header("Accept", "application/json")
req.add_header("Content-Type", "application/json")
req.add_header("Authorization", "token " + token)
req.add_header("Authorization", token)
timestamp=datetime.datetime.now()
print(f"{timestamp} Requesting and parsing {q}")