C2DH / journal-of-digital-history-backend

backend for our Journal of Digital History
MIT License
4 stars 0 forks source link

In the preflight report include url pointed on the appropriate paragraph/cell in order to use the cell number JSON #206

Open eliselavy opened 11 months ago

eliselavy commented 11 months ago

Ex: No valid tags found for image output in cell 7 https://github.com/C2DH/template_repo_JDH_R/blob/master/report.md

doesn't make sense for the author as it's the cell number json

need to include the url like this: https://github.com/C2DH/template_repo_JDH_R/blob/master/author_guideline_template.ipynb

https://journalofdigitalhistory.org/en/notebook-viewer/JTJGcHJveHktZ2l0aHVidXNlcmNvbnRlbnQlMkZDMkRIJTJGdGVtcGxhdGVfcmVwb19KREhfUiUyRm1hc3RlciUyRmF1dGhvcl9ndWlkZWxpbmVfdGVtcGxhdGUuaXB5bmI=?idx=7

eliselavy commented 11 months ago

In the workflow_dispatch in order to know the branch when the workflow is launched , need to use:github.ref

As workflow can be run from branch also:

Screenshot 2023-10-03 at 18 25 07

The others didn't work for workflow_dispatch

Screenshot 2023-10-03 at 17 13 25

To point on the url https://journalofdigitalhistory.org/en/notebook-viewer/JTJGcHJveHktZ2l0aHVidXNlcmNvbnRlbnQlMkZDMkRIJTJGdGVtcGxhdGVfcmVwb19KREhfUiUyRm1hc3RlciUyRmF1dGhvcl9ndWlkZWxpbmVfdGVtcGxhdGUuaXB5bmI=?idx=7, need to encode the GitHub url by passing proxy_value = f'/proxy-githubusercontent/{username}/{repo}/{filepath}'

Docs here about GitHub context https://docs.github.com/en/actions/learn-github-actions/contexts#github-context

eliselavy commented 11 months ago

problem by testing due to https://github.com/C2DH/journal-of-digital-history/issues/581