GithubHelp home page GithubHelp logo

optible / jirafy-sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onxmaps/jirafy-sync

0.0 0.0 0.0 1.06 MB

Sync's Jira tickets and versions based on a given changelog

License: MIT License

JavaScript 100.00%

jirafy-sync's Introduction

Unit Tests

Jirafy Sync

Sync Jira tickets and version based on a given changelog (ideally generated by Jirafy Changelog)

What does Jirafy Sync do?

This action requires a changelog as input. If the changelog has references to Jira tickets, it will parse the changelog for Jira projects and tickets. For each project, the latest repository release will be the Jira project version created. Each Jira ticket's fixVersions property will be updated to the corresponding Jira version created.

Inputs

Jira credentials are required in order for Jirafy Sync to authenticate to the Jira rest api on your behalf.

  • jiraUsername
    • Username of a jira user (preferably one designated for automation tasks)
  • jiraToken
    • Corresponding token of the jira user
  • jiraHost
    • Jira organization host name (i.e jirafy-sync.atlassian.net)
  • changelog
  • jiraVersion
    • Github release version # (i.e v2.1.0)
      • TIP: Use the Jirafy Changelog output: ${{ steps.changelog.outputs.changelog }}

Jirafy Sync in action

Creates Jira Version

Jirafy Sync Release v2.0.0

Jirafy Sync Release Detail v2.0.0

Updates Jira ticket(s) fixVersion property

Jirafy Sync fixVersion v2.0.0


Recommended github workflow

  • Jirafy Sync works best if Jirafy Changelog github action generates the changelog. The changelog can be generated given there is already at least one github release in your repository.

  • Next you'll need to generate a release. I recommend using actions/create-release@latest.

  • Finally you'll want to sync the github release with a jira version using Jirafy Sync action. The ${{ github.ref_name }} value is the tag that triggers the recommended workflow and should set as the input of jiraVersion property. The action will create the corresponding Jira project versions that don't already exist, as well as update the fix version of each ticket that was found in the given changelog.

name: Jirafy Sync
on:
  push:
    # Sequence of patterns matched against refs/tags
    tags:
      - 'v*' # Push events to matching v*, i.e. v1.0, v1.0.0

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      # To use this repository's private action, you must check out the repository
      - name: Checkout
        uses: actions/checkout@v2

      - name: Jirafy Changelog
        id: changelog
        uses: onXmaps/[email protected]
        with:
          jiraHost: 'example.atlassian.net'
          myToken: ${{ secrets.GITHUB_TOKEN }}

      - name: Create Release
        id: create_release
        uses: actions/create-release@latest
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          body: ${{ steps.changelog.outputs.changelog }}
          draft: false
          prerelease: false

      - name: Jirafy Sync
        uses: onXmaps/[email protected]
        with:
          changelog: ${{ steps.changelog.outputs.changelog }}
          jiraVersion: ${{ github.ref_name }}
          jiraHost: 'example.atlassian.net'
          jiraUsername: ${{ secrets.JIRA_USERNAME }}
          jiraToken: ${{ secrets.JIRA_TOKEN }}

jirafy-sync's People

Contributors

coltdorsey avatar renovate-bot avatar samirpdl 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.