Skip to content

Commit 509e6d5

Browse files
Merge branch 'develop' into develop
2 parents 33cd225 + f61c76b commit 509e6d5

File tree

371 files changed

+20939
-14600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+20939
-14600
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
### Checklist
1818

1919
- [ ] Test coverage for new or modified code paths
20-
- [ ] Changelog is updated
20+
- [ ] Changelog fragment(s) or "no changelog" label added (see [`changelog.d/README.md`](changelog.d/README.md))
2121
- [ ] Required documentation changes (e.g., `docs/rpc/openapi.yaml` and `rpc-endpoints.md` for v2 endpoints, `event-dispatcher.md` for new events)
2222
- [ ] New clarity functions have corresponding PR in `clarity-benchmarking` repo
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Changelog Check
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
changelog-check:
8+
name: Check for changelog fragments
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check for changelog fragments
12+
uses: actions/github-script@v7
13+
with:
14+
script: |
15+
if (context.eventName !== 'pull_request') {
16+
core.info(`Event is '${context.eventName}', not a pull request — skipping.`);
17+
return;
18+
}
19+
// Fetch current labels (payload labels are stale on re-runs)
20+
const { data: pr } = await github.rest.pulls.get({
21+
owner: context.repo.owner,
22+
repo: context.repo.repo,
23+
pull_number: context.issue.number,
24+
});
25+
const labels = pr.labels.map(l => l.name);
26+
if (labels.includes('no changelog')) {
27+
core.info('PR has "no changelog" label — skipping changelog check.');
28+
return;
29+
}
30+
31+
const { data: files } = await github.rest.pulls.listFiles({
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
pull_number: context.issue.number,
35+
per_page: 100,
36+
});
37+
38+
// Fail if CHANGELOG.md is modified directly
39+
const directEdits = files.filter(f =>
40+
(f.filename === 'CHANGELOG.md' || f.filename === 'stacks-signer/CHANGELOG.md') &&
41+
f.status === 'modified'
42+
);
43+
44+
if (directEdits.length > 0) {
45+
const edited = directEdits.map(f => f.filename).join(', ');
46+
core.setFailed(
47+
`Do not edit ${edited} directly. ` +
48+
'Add a changelog fragment to changelog.d/ or stacks-signer/changelog.d/ instead ' +
49+
'(see changelog.d/README.md for instructions).'
50+
);
51+
return;
52+
}
53+
54+
const validExtensions = ['added', 'changed', 'fixed', 'removed'];
55+
const fragments = files.filter(f =>
56+
(f.filename.startsWith('changelog.d/') || f.filename.startsWith('stacks-signer/changelog.d/')) &&
57+
f.status === 'added' &&
58+
validExtensions.some(ext => f.filename.endsWith(`.${ext}`))
59+
);
60+
61+
if (fragments.length === 0) {
62+
core.setFailed(
63+
'No changelog fragment found. Please add a fragment file to changelog.d/ ' +
64+
'or stacks-signer/changelog.d/ (see changelog.d/README.md for instructions). ' +
65+
'If no changelog entry is needed, add the "no changelog" label to the PR.'
66+
);
67+
} else {
68+
const names = fragments.map(f => f.filename).join(', ');
69+
core.info(`Found changelog fragment(s): ${names}`);
70+
}

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ jobs:
4848
with:
4949
alias: "fmt-stacks"
5050

51+
changelog-check:
52+
name: Changelog Check
53+
uses: ./.github/workflows/changelog-check.yml
54+
5155
######################################################################################
5256
## Check if the branch that this workflow is being run against is a release branch
5357
##
@@ -64,6 +68,7 @@ jobs:
6468
name: Check Release
6569
needs:
6670
- rustfmt
71+
- changelog-check
6772
runs-on: ubuntu-latest
6873
outputs:
6974
node_tag: ${{ steps.check_release.outputs.node_tag }}
@@ -96,6 +101,7 @@ jobs:
96101
name: Create Release
97102
needs:
98103
- rustfmt
104+
- changelog-check
99105
- check-release
100106
secrets: inherit
101107
uses: ./.github/workflows/release-github.yml
@@ -121,6 +127,7 @@ jobs:
121127
name: Create Test Cache
122128
needs:
123129
- rustfmt
130+
- changelog-check
124131
- check-release
125132
uses: ./.github/workflows/create-cache.yml
126133

@@ -142,6 +149,7 @@ jobs:
142149
name: Stacks Core Tests
143150
needs:
144151
- rustfmt
152+
- changelog-check
145153
- create-cache
146154
- check-release
147155
uses: ./.github/workflows/stacks-core-tests.yml
@@ -164,6 +172,7 @@ jobs:
164172
name: Constants Check
165173
needs:
166174
- rustfmt
175+
- changelog-check
167176
- check-release
168177
uses: ./.github/workflows/constants-check.yml
169178

@@ -185,6 +194,7 @@ jobs:
185194
name: Cargo Hack Check
186195
needs:
187196
- rustfmt
197+
- changelog-check
188198
- check-release
189199
uses: ./.github/workflows/cargo-hack-check.yml
190200

@@ -205,6 +215,7 @@ jobs:
205215
name: Bitcoin Tests
206216
needs:
207217
- rustfmt
218+
- changelog-check
208219
- create-cache
209220
- check-release
210221
uses: ./.github/workflows/bitcoin-tests.yml
@@ -218,6 +229,7 @@ jobs:
218229
name: P2P Tests
219230
needs:
220231
- rustfmt
232+
- changelog-check
221233
- create-cache
222234
- check-release
223235
uses: ./.github/workflows/p2p-tests.yml
@@ -231,6 +243,7 @@ jobs:
231243
name: Epoch Tests
232244
needs:
233245
- rustfmt
246+
- changelog-check
234247
- create-cache
235248
- check-release
236249
uses: ./.github/workflows/epoch-tests.yml

0 commit comments

Comments
 (0)