Socket
Book a DemoInstallSign in
Socket

@runcapsule/jirabas

Package Overview
Dependencies
Maintainers
4
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@runcapsule/jirabas

CLI tool that automatically creates releases in Jira and release git-tags in your repo

0.3.0
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
4
Weekly downloads
 
Created
Source

Jirabas

Jirabas makes it easy to create next release for your app and generate Jira ticket.

Jirabas Demo

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: 'jirabas@own.you',
      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 to master
  • Pull the development branch
  • Find commits added after a previous release tag
  • Create changelog from these commits
  • Checkout to the release branch. Defaults to release/<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

FAQs

Package last updated on 11 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.