test(sdlc-feat-assets): 第三段補上兩個 repo 的區別與重跑的行為
說明 --repo 與 --issue-repo 的差別、--base 要明講不讓腳本猜、重跑不會開出第二顆 PR, 以及提交中途失敗時不要自己回捲歷史。
This commit is contained in:
@@ -244,6 +244,28 @@ test('先開 PR 再停錶,且 PR 沒開成就不停錶', () => {
|
|||||||
assert.match(phase3, /工時要記在真的有做事的那段時間上/);
|
assert.match(phase3, /工時要記在真的有做事的那段時間上/);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('PR 的 repo 與議題的 repo 分開講清楚', () => {
|
||||||
|
assert.match(phase3, /--issue-repo/);
|
||||||
|
assert.match(phase3, /程式碼所在的 repo/);
|
||||||
|
assert.match(phase3, /工作包議題所在的/);
|
||||||
|
assert.match(phase3, /常常不是同一個/, '要說出為什麼需要兩個旗標');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('--base 要明講,不讓腳本猜', () => {
|
||||||
|
assert.match(phase3, /--base/);
|
||||||
|
assert.match(phase3, /不替你猜/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('重跑不會開出第二顆 PR,正本要說', () => {
|
||||||
|
assert.match(phase3, /重跑不會開出第二顆 PR/);
|
||||||
|
assert.match(phase3, /created/);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('提交中途失敗的處置有交代,且明講不要自己回捲歷史', () => {
|
||||||
|
assert.match(phase3, /前面已經建立的那幾顆 commit/);
|
||||||
|
assert.match(phase3, /不要自己去回捲歷史/);
|
||||||
|
});
|
||||||
|
|
||||||
test('兩支腳本都要求先試跑', () => {
|
test('兩支腳本都要求先試跑', () => {
|
||||||
const dryRuns = phase3.match(/--dry-run/g) ?? [];
|
const dryRuns = phase3.match(/--dry-run/g) ?? [];
|
||||||
assert.ok(dryRuns.length >= 2, `兩支寫入型腳本各要先試跑,只找到 ${dryRuns.length} 處`);
|
assert.ok(dryRuns.length >= 2, `兩支寫入型腳本各要先試跑,只找到 ${dryRuns.length} 處`);
|
||||||
|
|||||||
Reference in New Issue
Block a user