Repository navigation
Post rendered docs link as a sticky PR comment - #1159
Conversation
|
Hi @lundybernard, thanks for doing this! You were mighty quick 🏃 💨 |
|
Inspired by the netlify sticky posts that scientific-python.org uses, example: scientific-python/learn.scientific-python.org#247 (comment) Netlify builds each PR from This PR adds a minimal implementation. 🤖 AI text below 🤖 I assembled this from the action docs rather than one workflow: Workflows doing the same parts:
I chose list-and-match over |
|
Thank you for posting those other job links! It was very helpful in determining the following for me. That said, I'm almost happy to merge this in and try it out. I'm just thinking here from a security perspective, which is important in this day-and-age. |
|
Sure, an earlier draft did just that, keeping the write permission isolated. I moved it into the the existing job in the interest of simplicity. Its a balance between the cost of an extra job vs a little extra security, and personally I prefer tighter security. I'll make the change in a fixup commit so we can look at the diffs side-by-side. |
Two steps in the redirector job post the CircleCI preview URL as a pull request comment after a successful docs build. Each later build updates the same comment in place. Assisted-by: claude-code:claude-opus-5-5 [The Engineer]
The comment steps move to the post_preview_comment job, the only job with pull-requests: write. The redirector job keeps statuses: write and passes the preview URL to it as a job output. Assisted-by: claude-code:claude-opus-5-5 [The Engineer]
214873d to
5a33f41
Compare
|
@TimMonko If you're happy with the implementation in the REVIEW FIX, I'll apply it and rebase this back to a single commit before its merged. |
|
Hi @lundybernard, no need to restructure commits, we use squash+merge in order to allow the PR history to be "creative" and the main branch to be clean. Would you like to add yourself to our citation file in https://github.com/napari/napari? - given-names: Lundy
family-names: Bernard
affiliation: <optional> (e.g. napari University)
orcid: https://orcid.org/<ORCID> <optional>
alias: lundybernard |
# References and relevant issues Follows the docs contribution merged in napari/docs@d91251e (napari/docs#1159). # Description Adds Lundy Bernard to the contributors citation.
Two steps in the redirector job post the CircleCI preview URL as a
pull request comment after a successful docs build. Each later build
updates the same comment in place.
References and relevant issues
During the last docs workgroup call,
I had to dig through the workflows to find the generated doc preview.
This change aims to put that link front-and-center in the PR.
Description
Adds a 'sticky' comment to a PR that builds the docs,
which contains a link to the generated document preview.
This should improve the review workflow and experience,
especially for new contributors.
Caveat: the workflow runs from the default branch on status events,
so the comment appears on other PRs only after this
merges. It cannot demo itself on its own PR.
I may be able to run a test to show the results on my fork if needed,
but it will require some additional work setting up CircleCI.