Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,52 +200,3 @@ jobs:
echo ""
echo "Tag the next release with: \`./scripts/bump-version.sh $BUMP\`"
} | tee -a "$GITHUB_STEP_SUMMARY"

# ── Linear Issue Reference (PRs to develop) ───────────────────────────────
# Enforces that PRs reference a Linear issue (AMC-N) so the Linear ↔ GitHub
# sync auto-closes the right ticket on merge. Without this, Linear tickets
# stay in Backlog after their work ships (verified 2026-05-02 with
# AMC-71/72/73/74). Skipped for PRs to main (release-promotion rolls up
# commits already checked at the develop merge) and for dependabot.
linear-ref:
name: Linear Issue Reference
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.base_ref != 'main' && github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0

- name: Check PR body or commits reference an AMC-N issue
env:
PR_BODY: ${{ github.event.pull_request.body }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.sha }}
run: |
BUFFER="$PR_BODY"$'\n'"$(git log --format='%B' "${BASE_SHA}..${HEAD_SHA}")"

if echo "$BUFFER" | grep -qE 'AMC-[0-9]+'; then
ID=$(echo "$BUFFER" | grep -oE 'AMC-[0-9]+' | head -1)
echo "✓ References Linear issue: $ID"
exit 0
fi

if echo "$BUFFER" | grep -qE '^No-Linear-Issue:'; then
REASON=$(echo "$BUFFER" | grep -E '^No-Linear-Issue:' | head -1 | sed 's/^No-Linear-Issue:[[:space:]]*//')
echo "✓ Explicit opt-out (No-Linear-Issue: $REASON)"
exit 0
fi

echo "✗ This PR does not reference a Linear issue."
echo ""
echo "Add an AMC-N reference to the PR body (e.g. 'Fixes AMC-123')"
echo "or any commit message, so the Linear ↔ GitHub sync auto-closes"
echo "the right ticket on merge."
echo ""
echo "Linear project: https://linear.app/amcheste/project/claude-teams-operator-32aab082f36b"
echo ""
echo "If this PR genuinely is not associated with a Linear issue (e.g."
echo "trivial doc fix, dependency bump, release promotion), add a"
echo "trailer to the PR body:"
echo " No-Linear-Issue: <reason>"
exit 1
Loading