From 0611d9d06df76ef63f37ebf301d2fa85de2e7f15 Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Wed, 12 Mar 2025 10:31:21 -0600 Subject: [PATCH] test(pr create): fix user:branch syntax AT This test was setting `remote.pushDefault` which likely caused the `user:branch` syntax to be ignored. Update the test to not set this config value. --- ...ar => pr-create-respects-user-colon-branch-syntax.txtar} | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) rename acceptance/testdata/pr/{pr-create-respects-remote-colon-branch-syntax.txtar => pr-create-respects-user-colon-branch-syntax.txtar} (89%) diff --git a/acceptance/testdata/pr/pr-create-respects-remote-colon-branch-syntax.txtar b/acceptance/testdata/pr/pr-create-respects-user-colon-branch-syntax.txtar similarity index 89% rename from acceptance/testdata/pr/pr-create-respects-remote-colon-branch-syntax.txtar rename to acceptance/testdata/pr/pr-create-respects-user-colon-branch-syntax.txtar index 47d6f5e5b..d9b22a023 100644 --- a/acceptance/testdata/pr/pr-create-respects-remote-colon-branch-syntax.txtar +++ b/acceptance/testdata/pr/pr-create-respects-user-colon-branch-syntax.txtar @@ -34,15 +34,13 @@ cd ${FORK} # Prepare a branch where changes are pulled from the upstream default branch but pushed to fork exec git checkout -b feature-branch upstream/main -exec git config remote.pushDefault origin -exec git config unset remote.upstream.gh-resolved exec git commit --allow-empty -m 'Empty Commit' -exec git push +exec git push origin feature-branch # Create the PR spanning upstream and fork repositories exec gh pr create --title 'Feature Title' --body 'Feature Body' --head ${USER}:feature-branch stdout https://${GH_HOST}/${ORG}/${REPO}/pull/1 # Assert that the PR was created with the correct head repository and refs -exec gh pr view --json headRefName,headRepository,baseRefName,isCrossRepository +exec gh pr view ${USER}:feature-branch --json headRefName,headRepository,baseRefName,isCrossRepository stdout {"baseRefName":"main","headRefName":"feature-branch","headRepository":{"id":"${FORK_ID}","name":"${FORK}"},"isCrossRepository":true} \ No newline at end of file