Skip to content

Commit e92e5c0

Browse files
authored
Merge pull request #80 from bioconda/circleci-api-v1
fix: Use circleci API v1.1 to avoid login error
2 parents 03817dd + 71fc29e commit e92e5c0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/bot.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-22.04
2727
env:
2828
IMAGE_NAME: bot
29-
IMAGE_VERSION: '1.3.0'
29+
IMAGE_VERSION: '1.3.1'
3030

3131
steps:
3232
- uses: actions/checkout@v2

images/bot/setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = bioconda-bot
3-
version = 0.0.4
3+
version = 0.0.5
44

55
[options]
66
python_requires = >=3.8

images/bot/src/bioconda_bot/common.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,13 @@ async def fetch_circleci_artifacts(session: ClientSession, workflowId: str) -> [
160160
for job in res_wf_object["items"]:
161161
if job["name"].startswith(f"build_and_test-"):
162162
circleci_job_num = job["job_number"]
163-
url = f"https://circleci.com/api/v2/project/gh/bioconda/bioconda-recipes/{circleci_job_num}/artifacts"
163+
url = f"https://circleci.com/api/v1.1/project/gh/bioconda/bioconda-recipes/{circleci_job_num}/artifacts"
164164

165165
async with session.get(url) as response:
166+
response.raise_for_status()
166167
res = await response.text()
167-
168168
res_object = safe_load(res)
169-
for artifact in res_object["items"]:
169+
for artifact in res_object:
170170
zipUrl = artifact["url"]
171171
pkg = artifact["path"]
172172
if zipUrl.endswith((".conda", ".tar.bz2")): # (currently excluding container images) or zipUrl.endswith(".tar.gz"):

0 commit comments

Comments
 (0)