Coder Social home page Coder Social logo

ecosse3 / github-action-jira-fixversion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from levigo/github-action-jira-fixversion

0.0 1.0 0.0 3.49 MB

Intended for CD, this action creates and sets the given version as fix version in Jira Cloud for given issue

License: BSD 3-Clause "New" or "Revised" License

JavaScript 100.00%

github-action-jira-fixversion's Introduction

Jira create and set fix version

This action is intended for Continuous Delivery with Jira Cloud. The action will set the "fix version" in Jira to the given version (and creates the version if needed).

Screenshot of a Jira Cloud issue with fix version

Inputs

  • domain: Domain name of the Jira cloud instance (e.g. your-domain.atlassian.net)
  • username: Jira Username
  • password: Jira Personal Access Token. Get it from here
  • versionName: The name of the Version to use (e.g. "1.0.5")
  • issueKeys: The key(s) of the issue(s) that is to be updated. If multiple are used, separate them with a comma (e.g. "TEST-1,TEST-2")
  • versionDescription: The description of the Version (default: "CD version")
  • versionArchived: Mark the new version as archived (default: false)
  • versionReleased: Mark the new version as released (default: false)

Outputs

None

Example usage

uses: levigo/[email protected]
with:
  domain: "my-company.atlassian.net"
  username: "[email protected]"
  password: "fmpUJkGhdKFvoTJclsZ03xw1"
  versionName: "1.0.5"
  versionDescription: "Continuous Delivery Version"
  issueKeys: "TEST-1"

Usage with "GLIX Action โ€“ the Git Log Identifier eXtractor"

Here is an example on how to extract the issueKeys from the commit messages and set the same fix version for all those Jira issues.

  - uses: actions/checkout@v3
    with:
      fetch-depth: '30'

  - uses: levigo/[email protected]
    id: glix
    with:
      commitId: ${{ github.sha }}
      mainBranch: "master"

  - uses: levigo/[email protected]
    with:
      domain: "my-company.atlassian.net"
      username: "[email protected]"
      password: "fmpUJkGhdKFvoTJclsZ03xw1"
      versionName: "1.0.5"
      versionDescription: "Continuous Delivery Version"
      issueKeys: ${{ steps.glix.outputs.issueKeys }}

Usage with "Action Regex Match"

Here is an example on how to extract the issueKeys (but only the latest) from the commit message. The regex is based on Atlassian Documentation.

      - uses: actions-ecosystem/action-regex-match@v2
        id: regex-match
        with:
          text: ${{ github.event.head_commit.message }}
          regex: "((?<!([A-Z]{1,10})-?)[A-Z]+-\d+)"

      - uses: levigo/[email protected]
        with:
          domain: "my-company.atlassian.net"
          username: "[email protected]"
          password: "fmpUJkGhdKFvoTJclsZ03xw1"
          versionName: "1.0.5"
          versionDescription: "Continuous Delivery Version"
          issueKeys: ${{ steps.regex-match.outputs.match }}

github-action-jira-fixversion's People

Contributors

werthdavid avatar benjaminalbanese avatar ecosse3 avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.