@runcapsule/jirabas
v0.3.0
Published
CLI tool that automatically creates releases in Jira and release git-tags in your repo
Downloads
5
Readme
Jirabas
Jirabas makes it easy to create next release for your app and generate Jira ticket.
Usage
yarn add -D @runcapsule/jirabas
Add config file jirabas.config.ts
to the root of the project. Config example:
import { TJirabasUserConfig } from 'jirabas'
const jirabasConfig: TJirabasUserConfig = {
jira: {
api: {
host: 'kek.atlassian.net',
email: '[email protected]',
token: 'QWERTY',
}
},
apps: {
provider: {
releaseTagGlob: 'app-provider_v*',
projectKey: 'FE',
componentName: 'My cool app 2.0',
releaseIssueTypeName: 'Release',
linkTypeName: 'Release',
patchReleaseTicket: (releaseTicket: any, releaseTag: string) => {
releaseTicket.fields.customfield_11265 = releaseTag;
releaseTicket.fields.description = `Custom description config ${releaseTag}`;
return releaseTicket;
},
},
}
};
export default jirabasConfig
If some of app specific fields are unknown Jirabas will give you an ability to choose from multiple pulled options.
Commands
release
npx jirabas release provider
- Save current changes into a temporary commit
- Checkout to the
developmennt
branch. Defaults tomaster
- Pull the
development
branch - Find commits added after a previous release tag
- Create changelog from these commits
- Checkout to the
release
branch. Defaults torelease/<appName>
- Create a new release tag to the latest commit
- Push changes to the
origin
- Create release ticket in Jira
- Checkout back to the initial branch and reset temporary commit
findAndTransition
npx jirabas findAndTransition --query "Release app-provider_v1.0.0" --status "QA Done"
Find Jira issue usgin jql: text ~"<query>"
and transition it to the target status.
Configuration
To see all available flags and commands:
npx jirabas --help
npx jirabas <commandName> --help
Typing for configuration file including all possible fields:
type TJirabasConfig = {
apps: {
[key: string]: {
releaseTagGlob: string
projectKey?: string
componentName?: string
linkTypeName?: string
releaseIssueTypeName?: string
patchReleaseTicket(releaseTicket: any, releaseTag: string, tickets: any)?: any
}
}
jira: {
api: {
host: string
email: string
token: string
}
baseUrl?: string
ticketIDPattern?: RegExp
excludeIssueTypes?: string[]
includeIssueTypes?: string[]
}
template?: string
transformData?(data: TTransformDataType): Promise<TTransformDataType>;
sourceControl?: {
devBranch?: string
getNextReleaseBranchName(appName: string, releaseTag: string): string;
},
}
Source typings of the config typings: src/config/config.types.ts