* Channels whose dirs gained bump files in the triggering push — i.e. this push is * the promotion/graduation merge that delivered them. (Same range detection as the * channel publish trigger.)
(rootDir: string, config: BumpyConfig)
| 839 | * channel publish trigger.) |
| 840 | */ |
| 841 | function detectArrivedChannelFiles(rootDir: string, config: BumpyConfig): Set<string> { |
| 842 | const range = getPushEventRange(); |
| 843 | let diffRange: string; |
| 844 | if (range) { |
| 845 | diffRange = `${range.before}..${range.after}`; |
| 846 | } else { |
| 847 | if (!tryRunArgs(['git', 'rev-parse', '--verify', 'HEAD^'], { cwd: rootDir })) return new Set(); |
| 848 | diffRange = 'HEAD^..HEAD'; |
| 849 | } |
| 850 | // --no-renames so file moves into channel dirs show up as additions |
| 851 | const out = tryRunArgs( |
| 852 | ['git', 'diff', '--name-only', '--diff-filter=A', '--no-renames', diffRange, '--', '.bumpy/'], |
| 853 | { cwd: rootDir }, |
| 854 | ); |
| 855 | if (!out) return new Set(); |
| 856 | const knownChannels = new Set(channelNames(config)); |
| 857 | const arrived = new Set<string>(); |
| 858 | for (const f of out.split('\n')) { |
| 859 | if (!f.endsWith('.md') || f.endsWith('README.md')) continue; |
| 860 | const parts = f.split('/'); // .bumpy/<channel>/<id>.md |
| 861 | if (parts.length === 3 && knownChannels.has(parts[1]!)) arrived.add(parts[1]!); |
| 862 | } |
| 863 | return arrived; |
| 864 | } |
| 865 | |
| 866 | /** |
| 867 | * Close lingering channel release PRs whose cycles were promoted: once a channel's |
no test coverage detected
searching dependent graphs…