GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(github): `gh pr new` links the new pull request to the thread (#3… · Pipyakas/t3code@cc842f4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/source-control-github/src/shared
    • definition.test.ts
    • definition.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/source-control-github/src/shared/definition.test.ts‎

Copy file name to clipboardExpand all lines: packages/source-control-github/src/shared/definition.test.ts
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ describe("GitHub change request URLs", () => {
9696
});
9797
});
9898

99+
describe("GitHub CLI commands", () => {
100+
it("recognizes shell pull request creates, including gh's `new` alias", () => {
101+
for (const command of ["gh pr create --fill", "gh pr new --fill"]) {
102+
expect(definition.changeRequestCreateCommand.test(command), command).toBe(true);
103+
}
104+
expect(definition.changeRequestCreateCommand.test("gh pr view 7")).toBe(false);
105+
});
106+
});
107+
99108
describe("GitHub repository pages", () => {
100109
it("leaves the tree route on other hosts to them", () => {
101110
expect(
Collapse file

‎packages/source-control-github/src/shared/definition.ts‎

Copy file name to clipboardExpand all lines: packages/source-control-github/src/shared/definition.ts
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ export const definition = defineSourceControl({
125125
] as const),
126126
checkoutCommand: ({ number }) => `gh pr checkout ${number}`,
127127
changeRequestCloseCommand: /\bgh\s+(?:pr\s+(?:merge|close)|stack\s+merge)\b/u,
128-
changeRequestCreateCommand: /\bgh\s+pr\s+create\b/u,
128+
// `new` is gh's alias for `create`.
129+
changeRequestCreateCommand: /\bgh\s+pr\s+(?:create|new)\b/u,
129130
authorProfileUrl: (login, repositoryUrl) =>
130131
login.endsWith("[bot]")
131132
? null

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.