diff --git a/localinfra/scripts/init-data.sh b/localinfra/scripts/init-data.sh index 175f1cf4f..f9424a368 100644 --- a/localinfra/scripts/init-data.sh +++ b/localinfra/scripts/init-data.sh @@ -33,6 +33,7 @@ STATE_1=at://$OWNER_DID/sh.tangled.repo.issue.state/3lzg6kgvni222 PULL_1=at://$OWNER_DID/sh.tangled.repo.pull/3lzg7tkxvq222 PULL_2=at://$OWNER_DID/sh.tangled.repo.pull/3ms6rk5d6gk22 +PULL_3=at://$OWNER_DID/sh.tangled.repo.pull/3ms6rk5d6gk33 STRING_CODE=at://$OWNER_DID/sh.tangled.string/3lzg6ma4pa222 STRING_MARKDOWN=at://$OWNER_DID/sh.tangled.string/3lzg6nzdqy222 @@ -237,6 +238,37 @@ put_record "$PULL_2" "$(jq -nc \ versions:[{head:$head1, base:$base, createdAt:$createdAt1}, {head:$head2, base:$base, createdAt:$createdAt2}]}')" >/dev/null +# a stale PR: sv-fe has moved on, so this base is no longer an ancestor of it +PULL_3_BASE=a30e171f6297ac08777ce78bfea3fc9de27be8be +PULL_3_HEAD=7a486c07f881800c5dd5eec98dfb5fb10d96bddc + +keep_commit "$REPO_DID" "$PULL_3_BASE" "$PULL_3" +keep_commit "$REPO_DID" "$PULL_3_HEAD" "$PULL_3" + +put_record "$PULL_3" "$(jq -nc \ + --arg repo "$REPO_DID" \ + --arg title 'Add profile activity feed' \ + --arg body "$(cat <<'MARKDOWN' +Fixture for a PR whose merge-base went stale because the *target* branch moved, +not the source: + +1. `sv-fe` branches off `master` +2. `dwn/profile-activity` branches off `sv-fe` — merge-base recorded as `a30e171f` +3. `sv-fe` is rebased wholesale onto a newer `master` +4. `a30e171f` is no longer an ancestor of `sv-fe`, so the recorded base is stale + +This is why the diff says 62 files changed while merge-check says 1155 conflicted files +MARKDOWN +)" \ + --arg head "$PULL_3_HEAD" \ + --arg base "$PULL_3_BASE" \ + --arg createdAt '2025-09-22T10:44:35Z' \ + '{title:$title, body:$body, createdAt:$createdAt, + source:{repo:$repo, branch:"dwn/profile-activity"}, + target:{repo:$repo, branch:"sv-fe"}, + rounds:[], + versions:[{head:$head, base:$base, createdAt:$createdAt}]}')" >/dev/null + # --- string fixtures --- STRING_CODE_CID=$(put_record "$STRING_CODE" "$(jq -nc \