Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow providing a different title for PRs #12

Merged
merged 4 commits into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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