Skip to content

Commit

Permalink
added arc-summary again
Browse files Browse the repository at this point in the history
  • Loading branch information
Zerskk committed Aug 2, 2024
1 parent 6b06c8c commit 3504538
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/api/endpoints/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ async def publish_project(request: Request, background_tasks: BackgroundTasks,
try:
archive_file = gitlab_api.get_job_artifact_arcjson(project_id=project.id, branch="main", filename="arc.json",
job_name="Create ARC JSON")
# summary_file = gitlab_api.get_job_artifact_md(project_id=project.id, branch="main",
# filename="arc-summary.md", job_name="create ARC JSON")
summary_file = gitlab_api.get_job_artifact_md(project_id=project.id, branch="main",
filename="arc-summary.md", job_name="create ARC JSON")

except:
raise HTTPException(status_code=403, detail="Couldn't retrieve arc.json")
Expand All @@ -164,9 +164,9 @@ async def publish_project(request: Request, background_tasks: BackgroundTasks,
invenio_api.upload_draft_content(record_id, "arc.json", json.dumps(archive_file))
invenio_api.complete_draft_upload(record_id=record_id, filename="arc.json")

# invenio_api.start_draft_file_upload(record_id, ["arc-summary.md"])
# invenio_api.upload_draft_content(record_id, "arc-summary.md", summary_file)
# invenio_api.complete_draft_upload(record_id=record_id, filename="arc-summary.md")
invenio_api.start_draft_file_upload(record_id, ["arc-summary.md"])
invenio_api.upload_draft_content(record_id, "arc-summary.md", summary_file)
invenio_api.complete_draft_upload(record_id=record_id, filename="arc-summary.md")

invenio_api.update_draft(record_id=record_id, record_model=record)

Expand Down

0 comments on commit 3504538

Please sign in to comment.