Skip to content

Add PR labeler/sync/stale reusables (Phase 2b prep)#4

Merged
bryanbeverly merged 1 commit into
mainfrom
phase2b-add-reusables
Apr 20, 2026
Merged

Add PR labeler/sync/stale reusables (Phase 2b prep)#4
bryanbeverly merged 1 commit into
mainfrom
phase2b-add-reusables

Conversation

@bryanbeverly
Copy link
Copy Markdown
Contributor

@bryanbeverly bryanbeverly commented Apr 20, 2026

Summary

  • Adds the three reusable workflows (pr-labeler-reusable.yml, label-sync-reusable.yml, stale-reusable.yml) to this public repo, copied verbatim from trufflesecurity/.github-private.
  • Unblocks trufflesecurity/helm-charts (the only public repo in our PR Labeling rollout). GitHub forbids public repos from consuming reusable workflows that live in private/internal repos, so helm-charts cannot reach the copies in .github-private.
  • Reusables already check out scripts and labels.yml from this repo (trufflesecurity/.github), so no internal references need to change.

Rollout sequence (zero downtime)

  1. This PR -- add reusables to public .github. Non-breaking; existing consumers still call .github-private.
  2. Per-repo PRs -- switch all 7 consumer callers' uses: from trufflesecurity/.github-private/.github/workflows/... to trufflesecurity/.github/.github/workflows/.... Adds a new caller to helm-charts.
  3. Cleanup PR in .github-private -- delete the now-duplicated reusables.

Test plan

  • CI passes (actionlint via lint.yml).
  • After merge, verify the workflows are listed at https://github.com/trufflesecurity/.github/actions.
  • Step 2 PRs reference these workflows successfully.

Made with Cursor


Note

Low Risk
Additive workflow-only changes; no existing runtime code is modified. Risk is limited to consumers opting into these reusables and misconfiguring required caller permissions.

Overview
Adds three new reusable GitHub Actions workflows in this repo: label-sync-reusable.yml (sync labels from labels.yml into a caller repo), pr-labeler-reusable.yml (apply size/risk/checkbox labels via shared Python scripts), and stale-reusable.yml (PR-only wrapper around actions/stale with configurable stale/close thresholds).

All workflows intentionally inherit permissions from the caller (no permissions: block) and fetch scripts/labels from trufflesecurity/.github via actions/checkout sparse checkout so public repos can consume them without PAT/app credentials.

Reviewed by Cursor Bugbot for commit 75bc155. Bugbot is set up for automated code reviews on this repo. Configure here.

GitHub forbids public repos from consuming reusable workflows that live
in private/internal repos, so trufflesecurity/helm-charts (the only
public repo in our PR Labeling rollout) cannot reach the reusables in
.github-private. Move the reusables to this public repo so all 7
consumers (1 public, 6 private/internal) can use them.

The reusables already check out scripts and labels.yml from this repo,
so no internal references need to change.

Follow-up PR will switch existing consumer callers from
trufflesecurity/.github-private to trufflesecurity/.github, then a
final PR will remove the now-duplicated reusables from .github-private.

Made-with: Cursor
@bryanbeverly bryanbeverly self-assigned this Apr 20, 2026
@bryanbeverly bryanbeverly marked this pull request as ready for review April 20, 2026 06:56
@bryanbeverly bryanbeverly merged commit 60f3cd3 into main Apr 20, 2026
3 checks passed
@bryanbeverly bryanbeverly deleted the phase2b-add-reusables branch April 20, 2026 06:58
bryanbeverly added a commit to trufflesecurity/helm-charts that referenced this pull request Apr 20, 2026
## Summary
- Switches the `sync-labels.yml` caller workflow's `uses:` reference
from `trufflesecurity/.github-private` to `trufflesecurity/.github`.
- Functionally identical: the reusable in the public `.github` repo is a
verbatim copy. The reusable already checks out scripts and `labels.yml`
from public `.github`, so behavior is unchanged.

## Why
GitHub forbids public repos from consuming reusable workflows that live
in private/internal repos, regardless of org-level Actions Access
settings. `trufflesecurity/helm-charts` is the only public repo in the
PR Labeling rollout, and it could not call the reusables in
`.github-private`. Moving the reusables to public `.github` (already
merged: trufflesecurity/.github#4) unblocks helm-charts. This PR
switches each consumer to the public source so that `.github-private`
can be cleaned up afterward.

## Test plan
- [x] CI passes
- [ ] After merge, `gh workflow run sync-labels.yml --repo
trufflesecurity/<this-repo>` runs successfully and re-applies the 11
standard labels

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Single-line CI workflow reference change; no application code or data
handling is modified.
> 
> **Overview**
> Updates the `Sync Labels` GitHub Actions workflow to call the reusable
label sync workflow from `trufflesecurity/.github` instead of
`trufflesecurity/.github-private`. This unblocks running the same label
synchronization workflow from public repositories without changing
behavior of the job itself.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0a7d3bf. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant