Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Support for Linear Ticket prefix (OB)

## [3.3.0] - 2024-11-20

### Added
Expand Down
20 changes: 10 additions & 10 deletions src/startUpdateDependents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ export default async function startUpdateDependents({ cwd }: { cwd: string }) {
const dependency = dependencyResult.packageJson.name
console.log('Beginning to update the dependents of:', dependency)

const { jiraTicket } = await enquirer.prompt<{
jiraTicket: string
const { ticket } = await enquirer.prompt<{
ticket: string
}>({
type: 'input',
name: 'jiraTicket',
message: `JIRA ticket to associate with pull requests? (e.g. ON-4323)`,
name: 'ticket',
message: `Ticket to associate with pull requests? (e.g. ON-4323, OB-4323)`,
required: true,
validate: (input) => {
if (!/^ON-\d+$/.test(input)) {
return 'JIRA ticket must be "ON-" followed by a number'
if (!/^(ON-|OB-)\d+$/.test(input)) {
return 'Ticket must be "ON-" or "OB-" followed by a number'
}
return true
},
Expand Down Expand Up @@ -117,7 +117,7 @@ export default async function startUpdateDependents({ cwd }: { cwd: string }) {

await executeCommand(
'git',
['checkout', '-b', jiraTicket],
['checkout', '-b', ticket],
repositoryWorkingDirectory,
)
if (isUpdatingTypes === 'yes') {
Expand All @@ -140,16 +140,16 @@ export default async function startUpdateDependents({ cwd }: { cwd: string }) {
await executeCommand('git', ['add', '-A'], repositoryWorkingDirectory)
await executeCommand(
'git',
['commit', '--message', `${jiraTicket} # Bumped ${dependency}`],
['commit', '--message', `${ticket} # Bumped ${dependency}`],
repositoryWorkingDirectory,
)
await executeCommand(
'git',
['push', '-u', 'origin', jiraTicket],
['push', '-u', 'origin', ticket],
repositoryWorkingDirectory,
)
createPullRequestUrls.push(
`https://github.com/oneblink/${productRepository.repositoryName}/pull/new/${jiraTicket}`,
`https://github.com/oneblink/${productRepository.repositoryName}/pull/new/${ticket}`,
)
},
)
Expand Down