Skip to content

Commit 7a17f04

Browse files
author
GitHub Workshop Bot
committed
fix: address final review nits (stale doc, test rigor, retry budget)
- sync-intake-to-roster.js: update parseIntakeIssue's docstring to list all fields it now returns (enrollment_repo/enrollment_issue_number were added without updating the comment). - challenge-progression-conflict-practice.test.js: pass delayMs=0 consistently, and tighten the first test's comment assertion so it can no longer pass via the fallback comment's text coincidentally also containing the PR number. - challenge-progression.js: give GitHub's async mergeable_state computation a slightly larger window (5 attempts instead of 3, same 2s spacing) before falling back to manual conflict-creation instructions, reducing false alarms under real latency.
1 parent 0eafe33 commit 7a17f04

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎.github/scripts/__tests__/challenge-progression-conflict-practice.test.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ test('opens a branch, two conflicting edits, a PR, and comments the issue', asyn
8484

8585
const issueComments = calls.filter((c) => c.method === 'POST' && c.route === '/repos/org/room/issues/11/comments');
8686
assert.equal(issueComments.length, 1);
87-
assert.match(issueComments[0].body.body, /#99/);
87+
assert.match(issueComments[0].body.body, /practice PR is ready/);
8888
});
8989

9090
test('is idempotent: does nothing when a practice PR already exists in any state', async () => {
@@ -132,7 +132,7 @@ test('never throws: progression survives a seeding failure', async () => {
132132
throw new Error('boom: no network');
133133
};
134134

135-
await assert.doesNotReject(ensureMergeConflictPractice(11, request));
135+
await assert.doesNotReject(ensureMergeConflictPractice(11, request, 0));
136136
});
137137

138138
test('falls back to manual instructions when the practice PR never registers as conflicting', async () => {

‎.github/scripts/provisioning/sync-intake-to-roster.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ const { parseRoster, serializeRoster, findLearner, upsertLearner, isValidHandle
3434
const INTAKE_TITLE_PREFIX = '[ENROLL-INTAKE]';
3535

3636
/**
37-
* Extract { github_handle, registered_at } from an intake issue, or null when
38-
* the issue is not a parseable intake record.
37+
* Extract the learner handle, registration time, intake issue number, and
38+
* enrollment issue reference (enrollment_repo/enrollment_issue_number) from an
39+
* intake issue, or null when the issue is not a parseable intake record.
3940
*/
4041
function parseIntakeIssue(issue) {
4142
if (!issue || typeof issue.title !== 'string') return null;

‎learning-room/.github/scripts/challenge-progression.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ const CONFLICT_BRANCH = 'challenge-7/conflict-practice';
388388
const CONFLICT_FILE = 'docs/welcome.md';
389389
const CONFLICT_ANCHOR = '<!-- challenge-7-conflict-anchor -->';
390390
const CONFLICT_PR_TITLE = 'Challenge 7 practice: resolve this merge conflict';
391-
const CONFLICT_VERIFY_ATTEMPTS = 3;
391+
const CONFLICT_VERIFY_ATTEMPTS = 5;
392392
const CONFLICT_VERIFY_DELAY_MS = 2000;
393393

394394
async function findOpenOrPastPullRequest(branch, request = githubRequest) {

0 commit comments

Comments
 (0)