Repository navigation
[no-ci]CI: restrict preview comment cleanup to the bot author - #3485
Conversation
closes NVIDIA#3484 The cleanup script matches comments by their sticky preview marker alone. A later comment quoting that marker can be selected instead of the bot's preview comment, causing cleanup to target the wrong comment and leave the preview link unchanged. Also require the comment author to be github-actions[bot], consistent with the sticky-comment action's lookup.
|
No actionable comments were generated in the recent review. Summary
Change: Bug fix · Severity of issue fixed: Low Merge Risk:
|
|
Same change as NVIDIA/cuda-python#3485: a later comment quoting the sticky marker could otherwise be edited in place of the bot's preview comment.
rwgk
left a comment
There was a problem hiding this comment.
LGTM as an incremental change.
Looking at this from a design perspective (not for this PR):
A permanent Note in the comments with the preview URLs would seem sufficient, e.g.:
Note: These preview URLs are temporary and may stop working after this pull request is closed or merged.
This would reduce comment-editing / github notifications churn and the cleanup script's comment lookup and editing logic could be removed entirely. ci/cleanup-pr-previews would only need to delete the preview files.
* Copy the PR preview deploy and cleanup from cuda-python Verbatim copy of ci/cleanup-pr-previews, .github/workflows/cleanup-pr-previews.yml, .github/actions/doc_preview/action.yml and .github/actions/get_pr_number/action.yml from NVIDIA/cuda-python at b80866b3556717c6e702b9a9d11a7fc4ba62097d. Adapted to this repo in the next commit. * Adapt the PR preview cleanup to numba-cuda-mlir Point it at NVIDIA/numba-cuda-mlir, whose previews live under pr-preview/ at the gh-pages root, give the gh-pages lock a repo-specific name, link the single preview URL, and pin checkout by SHA. * Deploy docs in a job that shares the gh-pages lock Split build-docs.yml like cuda-python: the build job uploads the docs, and a deploy job publishes them inside the concurrency group shared with the preview cleanup, so gh-pages writers queue instead of racing. Previews deploy only from pull-request/* refs, and pushes to main no longer remove the merged PR's preview; the nightly cleanup owns that. * Match the preview comment by bot author as well as marker Same change as NVIDIA/cuda-python#3485: a later comment quoting the sticky marker could otherwise be edited in place of the bot's preview comment.
Description
closes #3484
The cleanup script matches comments by their sticky preview marker alone. A later comment quoting that marker can be selected instead of the bot's preview comment, causing cleanup to target the wrong comment and leave the preview link unchanged.
Also require the comment author to be github-actions[bot], consistent with the sticky-comment action's lookup.
Checklist