From eca5cda9006a6920bc72a2b56c896d235bb62ac1 Mon Sep 17 00:00:00 2001 From: "George G. Vega Yon" Date: Fri, 4 Sep 2026 11:12:34 -0600 Subject: [PATCH 1/3] Add please-bump version check Requires DESCRIPTION and NEWS.md (heading style: 'Changes in netdiffuseR version 1.2.3 (date)') to agree on version whenever R/, src/, inst/, man/, man-roxygen/, data-raw/, DESCRIPTION, NAMESPACE, or NEWS.md change. Report-only for now (fail-on-error: false): the check posts its sticky PR comment but never blocks a merge. Flip fail-on-error to true in a follow-up once it has been observed on real PRs. Co-Authored-By: Claude Sonnet 5 --- .github/please-bump.yaml | 16 ++++++++++++++++ .github/workflows/please-bump.yml | 22 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/please-bump.yaml create mode 100644 .github/workflows/please-bump.yml diff --git a/.github/please-bump.yaml b/.github/please-bump.yaml new file mode 100644 index 0000000..03e6b5b --- /dev/null +++ b/.github/please-bump.yaml @@ -0,0 +1,16 @@ +version: 1 +groups: + netdiffuseR: + paths: + - R/ + - src/ + - inst/ + - man/ + - man-roxygen/ + - data-raw/ + - DESCRIPTION + - NAMESPACE + - NEWS.md + rules: + - preset: r-package + - preset: r-news-changes diff --git a/.github/workflows/please-bump.yml b/.github/workflows/please-bump.yml new file mode 100644 index 0000000..9d37765 --- /dev/null +++ b/.github/workflows/please-bump.yml @@ -0,0 +1,22 @@ +name: please-bump + +on: + pull_request: + types: [opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +jobs: + please-bump: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: gvegayon/please-bump@v1 + with: + # Report-only for now: posts the sticky comment, never reddens a PR. + # Flip to true once we've seen it behave on real PRs. + fail-on-error: false From aa2869c6d82b029a0ac3f484f6634e536f3fd818 Mon Sep 17 00:00:00 2001 From: "George G. Vega Yon" Date: Fri, 4 Sep 2026 11:26:21 -0600 Subject: [PATCH 2/3] Explain the fork-PR comment limitation inline A Copilot review comment on the measles PR (UofUEpiBio/measles#53) flagged that pull_request + a write-scoped pull-requests token doesn't help PRs from forks, since GitHub forces GITHUB_TOKEN to read-only there regardless. Document the tradeoff at the point it's made instead of leaving it unexplained: please-bump already degrades gracefully on fork PRs (warns, continues, pass/fail unaffected -- see its README), and switching to pull_request_target to fix comments there would hand a write-scoped token to a job that also diffs/checks out the fork's own code, which needs real sandboxing to be safe. Not worth it just for a comment. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/please-bump.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/please-bump.yml b/.github/workflows/please-bump.yml index 9d37765..d21a9ca 100644 --- a/.github/workflows/please-bump.yml +++ b/.github/workflows/please-bump.yml @@ -6,6 +6,13 @@ on: permissions: contents: read + # A PR from a fork gets a read-only GITHUB_TOKEN no matter what this says, + # so please-bump can't post/update its sticky comment there -- it logs a + # warning and continues; the pass/fail result and step summary are + # unaffected either way. `pull_request_target` would fix that, but it + # hands a write-scoped token to a job that also diffs/checks out the + # fork's own code, which needs careful sandboxing to be safe -- not worth + # it just for a comment. Report-only-for-forks is the deliberate tradeoff. pull-requests: write jobs: From c4517bde3c1ca333c983aed66c230d8747e7c7d6 Mon Sep 17 00:00:00 2001 From: "George G. Vega Yon" Date: Fri, 4 Sep 2026 11:39:28 -0600 Subject: [PATCH 3/3] Restrict please-bump trigger to the default branch A Copilot review comment on USCCANA/netdiffuseR#90 pointed out that without a branches: filter, this workflow also fires on PRs targeting any non-default branch, unlike this repo's other pull_request-triggered workflows -- unintended noise/cost. Match local convention. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/please-bump.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/please-bump.yml b/.github/workflows/please-bump.yml index d21a9ca..662168f 100644 --- a/.github/workflows/please-bump.yml +++ b/.github/workflows/please-bump.yml @@ -3,6 +3,7 @@ name: please-bump on: pull_request: types: [opened, synchronize, reopened] + branches: [master] permissions: contents: read