Skip to content

Commit

Permalink
feat: Allow providing a different title for PRs (#12)
Browse files Browse the repository at this point in the history
fixes #10
  • Loading branch information
schpet authored Feb 5, 2025
1 parent aa4f723 commit 6cd09e7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,12 @@ const issueCommand = new Command()
"--draft",
"Create the pull request as a draft",
)
.option(
"-t, --title <title:string>",
"Optional title for the pull request (Linear issue ID will be prefixed)",
)
.arguments("[issueId:string]")
.action(async ({ base, draft }, issueId) => {
.action(async ({ base, draft, title: customTitle }, issueId) => {
const resolvedId = await getIssueId(issueId);
if (!resolvedId) {
console.error(
Expand All @@ -277,7 +281,7 @@ const issueCommand = new Command()
"pr",
"create",
"--title",
`${resolvedId} ${title}`,
`${resolvedId} ${customTitle ?? title}`,
"--body",
url,
...(base ? ["--base", base] : []),
Expand Down

0 comments on commit 6cd09e7

Please sign in to comment.