Skip to content

Commit 41f05c8

Browse files
authored
Add check for gh label of 'cran-deadline' before running CRAN check
1 parent 9ad4eab commit 41f05c8

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/cran-status-check.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,25 @@ jobs:
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4
18-
18+
19+
- name: Check for existing CRAN issues
20+
id: check-issues
21+
run: |
22+
# Count open issues with CRAN-related labels
23+
ISSUE_COUNT=$(gh issue list --label "cran-deadline" --state open --json number | jq length)
24+
if [ $ISSUE_COUNT -eq 0 ] || [ $ARCHIVE_ISSUES -gt 0 ]; then
25+
SHOULD_RUN="true"
26+
echo "✅ Will run CRAN check"
27+
else
28+
SHOULD_RUN="false"
29+
echo "⏭️ Skipping CRAN check - existing issues found"
30+
fi
31+
echo "should-run=$SHOULD_RUN" >> $GITHUB_OUTPUT
32+
1933
- name: Check
34+
if: steps.check-issues.outputs.should-run == 'true'
2035
uses: dieghernan/cran-status-check@v2
2136
with:
2237
create-issue: "true"
38+
labels: "cran-deadline"
2339
statuses: "WARN,ERROR"

0 commit comments

Comments
 (0)