ci: exempt Server-Side Enhancement label from stale bot - #1841
Merged
Conversation
Issues blocked on server-side REST API work have no client-side activity to accumulate, so the stale bot would repeatedly flag them by default. Exempt the `server-side-gap` label (used to mark issues that need a server-side fix and cannot be resolved in TSC alone) so those items stay open until the underlying server work lands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The repo already has a 'Server-Side Enhancement' label applied to issues blocked on server-side REST API work (e.g. #1716, #1658, #1537, #1508). Adding a parallel 'server-side-gap' label would have been redundant. Point the stale-bot exemption at the existing label. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
bcantoni
approved these changes
Aug 25, 2026
jacalata
added a commit
that referenced
this pull request
Sep 2, 2026
* ci: shield issues with an open PR from the stale bot `actions/stale` only considers issue-level events when it decides whether to mark or close an issue. A PR that references an issue via `Closes #NNN` / `Fixes #NNN` does not reset the issue's stale timer or remove the `stale` label, so an issue can be auto-closed by the bot even while a PR that closes it is in review. Add a companion workflow that reacts to PR opens/edits and stamps the `in-progress` label on every referenced issue. The existing stale workflow already exempts `in-progress`. When a PR closes without being merged, the label is removed so a genuinely abandoned effort does not keep its referenced issues shielded forever. Merged PRs auto-close the referenced issues via GitHub's usual behavior, so leaving the label on them is harmless (they're closed). Uses `pull_request_target` for permissions on external-contributor PRs. The script only reads `pr.body`, extracts decimal issue numbers with a fixed regex, and passes those numbers to the REST API -- body content never reaches a `run:` step or a shell, so there is no command-injection surface even though the trigger runs with write permissions. Companion to #1841. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: unlabel on edited body, cap ref count for pull_request_target safety Two review findings: - On `edited` events the script now diffs `payload.changes.body.from` against the new body and removes 'in-progress' from any issue whose Closes/Fixes/Resolves reference was deleted. Previously, editing a PR to drop `Closes #42` left #42 shielded from the stale bot indefinitely. - Cap the number of references processed per event at 50 (`MAX_REFS`). `pull_request_target` runs on PRs from forks, so an accidental or malicious PR body with thousands of matches would burn the repo's REST budget on labeling calls. Also adds a one-line comment noting that cross-repo refs (owner/repo#N) are intentionally out of scope; this workflow only labels issues in the current repo. --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Some issues in this repo are legitimately blocked on Tableau server REST
API work, not on anything this client can fix. Without an exemption they
flap between "labeled stale" and "manually rescued" every 60 days,
because the user has no client-side activity they can add. Exempting the
existing
Server-Side Enhancementlabel lets those stay open as a livetracker.
Alternative considered: let stale close them and have the docs list
point to both open and closed bugs under the label. Chose this direction
so the label doubles as a live tracker rather than a historical index.
Companion to #1842 which adds a "Known server-side limitations" section
to
docs/api-ref.mdand points readers at this label.Behavior change
.github/workflows/stale.ymlgainsServer-Side Enhancementin theexempt-issue-labelslist. Existing exempt labels (good first issue,Design Proposal,in-progress) are preserved.Once merged, the next
workflow_dispatchrun removes thestalelabelfrom any issue that also has
Server-Side Enhancement-- currently#1716, #1658, #1537, #1508.
Test plan
currently-stale server-side issues get their labels removed
🤖 Generated with Claude Code