AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Python ai-promptsai-skillblueskyclaudeclaude-codeclawhubdeep-researchhackernewsinstagramopenclawpolymarketrecencyredditresearchsocial-mediatiktoktrendstwitterweb-searchyoutube
fix(ci): skip changelog fragments for Dependabot PRs (#1143)
Trevin Chow25a5cea5bfa5
diff --git a/.github/workflows/changelog-guard.yml b/.github/workflows/changelog-guard.ymlindex 6ef4329e..2561d47c 100644--- a/.github/workflows/changelog-guard.yml+++ b/.github/workflows/changelog-guard.yml@@ -3,7 +3,8 @@ name: Changelog guard# Non-release PRs must not edit CHANGELOG.md or bump lockstep version strings.# Content edits to SKILL.md / pyproject.toml / uv.lock are fine.# Release PRs (label: release) are exempt. Engine changes need a changelog-# fragment unless labeled skip-changelog.+# fragment unless labeled skip-changelog. Dependabot PRs skip the fragment+# requirement automatically (author dependabot[bot]); the label is optional.on:pull_request:@@ -30,6 +31,7 @@ jobs:PR_NUMBER: ${{ github.event.pull_request.number }}BASE_SHA: ${{ github.event.pull_request.base.sha }}HEAD_SHA: ${{ github.event.pull_request.head.sha }}+ PR_AUTHOR: ${{ github.event.pull_request.user.login }}run: |set -euo pipefail@@ -42,6 +44,13 @@ jobs:if printf '%s\n' "${LABELS}" | grep -qx 'skip-changelog'; thenSKIP_CHANGELOG=1fi+ # Dependabot cannot add skip-changelog itself (labels: in+ # dependabot.yml replaces default ecosystem labels, and a missing+ # repo label is silently dropped). Author is available on opened.+ if [ "${PR_AUTHOR}" = "dependabot[bot]" ]; then+ SKIP_CHANGELOG=1+ echo "PR author is dependabot[bot] — changelog fragment not required."+ fimapfile -t CHANGED < <(git diff --name-only "${BASE_SHA}...${HEAD_SHA}")diff --git a/AGENTS.md b/AGENTS.mdindex 259e0c37..fbf97274 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -49,7 +49,7 @@ Agents open most PRs. Follow this so `CHANGELOG.md` stops conflicting and versio1. **Feature/fix PRs:** add `changelog.d/<pr-or-issue>.<type>.md` (`added` / `changed` / `fixed` / `removed` / `deprecated` / `security`) when the change belongs in the next release notes. See `changelog.d/README.md` and `CONTRIBUTING.md`. Fill the PR template’s Summary, Agent disclosure, and Relationship sections.2. **Never** edit `CHANGELOG.md` in a feature PR. **Never** bump version strings in `pyproject.toml`, `SKILL.md`, plugin/marketplace JSON, or `uv.lock` outside a release PR. CI (`changelog-guard.yml`) enforces this.-3. **Nothing for release notes:** omit the fragment, check Skip changelog in the template, and add the `skip-changelog` label.+3. **Nothing for release notes:** omit the fragment, check Skip changelog in the template, and add the `skip-changelog` label. Dependabot PRs (author `dependabot[bot]`) skip that requirement automatically.4. **Cutting a release:** run Actions → **Prepare release** (patch/minor/major). That opens a `chore(release): bump version to X.Y.Z` PR which runs towncrier and bumps every lockstep surface. Merging to `main` triggers **Tag release**, which pushes `vX.Y.Z` and existing `release.yml` publishes `.skill` / `.mcpb` artifacts. Do not hand-edit ten version files. Contributors do not need a global towncrier install — `uv sync --group dev` (or the Action) provides it for release prep only.5. Lockstep gate remains `tests/test_plugin_contract.py::test_versions_match_across_manifests`. Workflow contract: `tests/test_changelog_workflow.py`.diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex c78626ec..9ddb8786 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -28,7 +28,7 @@ That installs pytest/coverage and **towncrier** into the project env. You do **n3. Fill out [`.github/PULL_REQUEST_TEMPLATE.md`](.github/PULL_REQUEST_TEMPLATE.md) — Summary (“what does this PR do”), Testing, Changelog, Agent disclosure, Relationship.4. Do **not** edit `CHANGELOG.md` and do **not** bump version strings in `pyproject.toml`, `SKILL.md`, plugin/marketplace JSON, or `uv.lock`. CI enforces that.-Chores with nothing for the release notes: check Skip changelog in the template and add the `skip-changelog` label.+Chores with nothing for the release notes: check Skip changelog in the template and add the `skip-changelog` label. Dependabot PRs skip that requirement automatically.Fragments are plain Markdown files. **towncrier is only used when cutting a release** (locally via `uv run` or in GitHub Actions) — contributors never run it for a feature PR.diff --git a/changelog.d/README.md b/changelog.d/README.mdindex 977ed140..f8b8e519 100644--- a/changelog.d/README.md+++ b/changelog.d/README.md@@ -34,4 +34,4 @@ General reports no longer promote unanchored fallback entity misses into synthes### Skip-Pure chores (typos in comments, CI pin bumps with nothing for release notes) can omit a fragment and check **Skip changelog** in the PR template, or add the `skip-changelog` label.+Pure chores (typos in comments, CI pin bumps with nothing for release notes) can omit a fragment and check **Skip changelog** in the PR template, or add the `skip-changelog` label. Dependabot PRs skip the fragment requirement automatically.diff --git a/tests/test_changelog_workflow.py b/tests/test_changelog_workflow.pyindex 2ffcf310..ffdde254 100644--- a/tests/test_changelog_workflow.py+++ b/tests/test_changelog_workflow.py@@ -172,6 +172,51 @@ class TestChangelogWorkflow(unittest.TestCase):label=str(path),)+ def test_changelog_guard_skips_dependabot_without_fragment(self) -> None:+ """Dependabot PRs must not need skip-changelog or a fragment.++ mcp/* is an engine path, so gomod bumps fail the fragment gate unless+ the author is exempted. Label-only exemption is not enough: Dependabot+ cannot reliably apply skip-changelog (custom labels replace defaults+ and missing repo labels are dropped). SKIP_CHANGELOG=1 from the+ Dependabot author check must precede the fragment gate and must not+ be reset afterwards.+ """+ text = (ROOT / ".github" / "workflows" / "changelog-guard.yml").read_text(+ encoding="utf-8"+ )+ self.assertIn("PR_AUTHOR: ${{ github.event.pull_request.user.login }}", text)+ self.assertIn("dependabot[bot]", text)+ dependabot_assign = re.search(+ r'if \[ "\$\{PR_AUTHOR\}" = "dependabot\[bot\]" \]; then\n'+ r"\s+SKIP_CHANGELOG=1",+ text,+ )+ self.assertIsNotNone(+ dependabot_assign,+ "Dependabot must set SKIP_CHANGELOG=1 from PR_AUTHOR",+ )+ fragment_gate = (+ 'if [ "${touches_engine}" -eq 1 ] && [ "${has_fragment}" -eq 0 ]'+ ' && [ "${SKIP_CHANGELOG}" -eq 0 ]; then'+ )+ gate_at = text.find(fragment_gate)+ self.assertNotEqual(+ gate_at,+ -1,+ "Fragment gate must still consult SKIP_CHANGELOG",+ )+ self.assertLess(+ dependabot_assign.start(),+ gate_at,+ "Dependabot SKIP_CHANGELOG=1 must precede the fragment gate",+ )+ self.assertNotIn(+ "SKIP_CHANGELOG=0",+ text[dependabot_assign.end() :],+ "SKIP_CHANGELOG must not be reset after the Dependabot assignment",+ )+def test_run_block_indent_checker_rejects_column_zero(self) -> None:malformed = ("jobs:\n"