@ankhorage/renovate 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ankhorage/renovate
|
|
2
2
|
|
|
3
|
+
## 0.2.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e3679ed: Delete validated same-repository Renovate branches after their pull requests merge so later dependency updates cannot remain blocked by retained edited heads.
|
|
8
|
+
|
|
3
9
|
## 0.2.10
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merged-branch-cleanup.test.d.ts","sourceRoot":"","sources":["../src/merged-branch-cleanup.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { describe, expect, test } from 'bun:test';
|
|
3
|
+
const workflow = readFileSync(new URL('../.github/workflows/changeset.yml', import.meta.url), 'utf8');
|
|
4
|
+
describe('merged Renovate branch cleanup', () => {
|
|
5
|
+
test('deletes only the validated Renovate head after a successful merge', () => {
|
|
6
|
+
const mergeCall = workflow.indexOf('github.rest.pulls.merge');
|
|
7
|
+
const mergedResultCheck = workflow.indexOf('if (!result.data.merged)');
|
|
8
|
+
const branchDeletion = workflow.indexOf('github.rest.git.deleteRef');
|
|
9
|
+
const sameRepositoryGate = workflow.lastIndexOf("pull.head.repo?.full_name !== owner + '/' + repo", mergeCall);
|
|
10
|
+
const renovateBranchGate = workflow.lastIndexOf("!pull.head.ref.startsWith('renovate/')", mergeCall);
|
|
11
|
+
expect(sameRepositoryGate).toBeGreaterThan(-1);
|
|
12
|
+
expect(renovateBranchGate).toBeGreaterThan(sameRepositoryGate);
|
|
13
|
+
expect(mergeCall).toBeGreaterThan(-1);
|
|
14
|
+
expect(mergedResultCheck).toBeGreaterThan(mergeCall);
|
|
15
|
+
expect(branchDeletion).toBeGreaterThan(mergedResultCheck);
|
|
16
|
+
expect(workflow).toContain("ref: 'heads/' + pull.head.ref");
|
|
17
|
+
expect(workflow).toContain('if (error.status !== 404)');
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=merged-branch-cleanup.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merged-branch-cleanup.test.js","sourceRoot":"","sources":["../src/merged-branch-cleanup.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,QAAQ,GAAG,YAAY,CAC3B,IAAI,GAAG,CAAC,oCAAoC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAC9D,MAAM,CACP,CAAC;AAEF,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC9C,IAAI,CAAC,mEAAmE,EAAE,GAAG,EAAE;QAC7E,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,QAAQ,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;QACvE,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;QACrE,MAAM,kBAAkB,GAAG,QAAQ,CAAC,WAAW,CAC7C,kDAAkD,EAClD,SAAS,CACV,CAAC;QACF,MAAM,kBAAkB,GAAG,QAAQ,CAAC,WAAW,CAC7C,wCAAwC,EACxC,SAAS,CACV,CAAC;QAEF,MAAM,CAAC,kBAAkB,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,kBAAkB,CAAC,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;QAC/D,MAAM,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