Skip to content

Commit

Permalink
Merge pull request #574 from conda-forge/fix-tokens
Browse files Browse the repository at this point in the history
BUG fix app token api requests
  • Loading branch information
beckermr authored Feb 17, 2024
2 parents 4e67e1a + c432450 commit 28617e0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clean-and-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: clean-and-update
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: tests
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
concurrency:
group: live-tests
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion conda-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ conda-build
conda-forge-metadata>=0.4.1
conda-forge-pinning
conda-smithy>=3.7.6 # this pin is for bot automerge and maint. team bug fixes
cryptography>=39
cryptography>=39,<42
python-dateutil
flake8
git
Expand Down
6 changes: 4 additions & 2 deletions conda_forge_webservices/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ def generate_app_token_for_webservices_only(app_id, raw_pem):
"https://api.github.com/app/installations",
headers={
'Authorization': 'Bearer %s' % token,
'Accept': 'application/vnd.github.machine-man-preview+json',
'Accept': 'application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
},
)
r.raise_for_status()
Expand All @@ -173,7 +174,8 @@ def generate_app_token_for_webservices_only(app_id, raw_pem):
"%s/access_tokens" % r.json()[0]["id"],
headers={
'Authorization': 'Bearer %s' % token,
'Accept': 'application/vnd.github.machine-man-preview+json',
'Accept': 'application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
},
)
r.raise_for_status()
Expand Down

0 comments on commit 28617e0

Please sign in to comment.