Repository navigation
ci: improve handling of pr labels - #8169
Conversation
|
I'll let this run, then add the label and kick a linux, windows, and macos job. |
|
Reviews (1): Last reviewed commit: "ci: improve handling of pr labels" | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
Reviews (2): Last reviewed commit: "Update .github/scripts/check-labels.sh" | Re-trigger Greptile |
…mage into process-labels-script
|
Reviews (3): Last reviewed commit: "Merge branch 'process-labels-script' of ..." | Re-trigger Greptile |
|
Reviews (4): Last reviewed commit: "move label check to run per job on linux" | Re-trigger Greptile |
|
Reviews (5): Last reviewed commit: "fix grep" | Re-trigger Greptile |
| exit 0 | ||
| fi | ||
|
|
||
| LABELS=$(gh pr view "$PR_NUMBER" --json labels --jq '.labels[].name') |
There was a problem hiding this comment.
This is a bit counterintuitive: do we not already have access to the labels in the workflow?
There was a problem hiding this comment.
This PR addresses the problem of the labels being associated with the event. Lars pointed out that he expected to be able to add the label and then re-run the workflow, but the original event did not have the label applied. This updates the logic to fetch it dynamically. I'll add a comment.
There was a problem hiding this comment.
Done. I also made the script name and step names more explicit.
|
Reviews (6): Last reviewed commit: "add new script" | Re-trigger Greptile |
| # re-running the workflow after adding the 'run-all-tests' label picks up | ||
| # the new label state correctly. | ||
| LABELS=$(gh pr view "$PR_NUMBER" --json labels --jq '.labels[].name') | ||
| HAS_LABEL=$(echo "$LABELS" | grep -c 'run-all-tests$' || true) |
There was a problem hiding this comment.
Could use jq here:
HAS_LABEL=$(gh pr view "$PR_NUMBER" --json labels \
--jq '[.labels[].name] | contains(["run-all-tests"])')
There was a problem hiding this comment.
Updated. I tested the script locally with and without the label applied to the PR.
stefanv
left a comment
There was a problem hiding this comment.
Go ahead and merge when ready. Suggested using jq, but the grep approach is fine too.
|
Reviews (7): Last reviewed commit: "address review" | Re-trigger Greptile |
* origin/main: (254 commits) Refactor, document migration utilities (scikit-image#8184) ci: improve handling of pr labels (scikit-image#8169) Doctest migration in PRs & on all platforms (scikit-image#8141) Update SKIP 4 (import hierarchy, backporting, testing) (scikit-image#8097) One page per function / class in HTML docs for skimage2 (scikit-image#8154) Pin minimum pytest to 9 (scikit-image#8174) docs: make source install instructions more discoverable and add build requirements to top level requirements file (scikit-image#8165) Drop `--maxfail=5` from local pytest config (scikit-image#8170) Use standard C99 static inline instead of `__inline` (scikit-image#8159) Fix structural_similarity win_size / gaussian_weights conflict (scikit-image#8162) Unwrap seed refactor (scikit-image#8142) ci: Remove llvm build and add ccache support on windows (scikit-image#8164) Document warn_external in contributing guide (scikit-image#8163) CI: Fix emscripten dependencies and clean up wheel test commands (scikit-image#8147) Test only changed subpackages (scikit-image#8103) Fix nightlies: update deprecated scipy call, fix underdetermined test Fix minkowski distanced invocation for SciPy >= 1.18 (scikit-image#8157) Port `structural_similarly` to ski2 (scikit-image#8104) make spin build requirement a lower bound (scikit-image#8158) Drop Python 3.11 Support (scikit-image#8153) ...
Partially addresses #8166, by checking the current state of the PR instead of the triggering event, enabling you to add the label and then re-run CI without pushing another commit.
Adds a central script to
.github/scriptsto share the logic between workflows.Run without label: "Run only modified tests"
Run after label (no new push): "Run all tests"
AI Usage
This PR was developed with the assistance of Claude Code (claude-sonnet-4-6).
I (@blink1073) have thoroughly reviewed the changes.