Skip to content

bryannice/gitactions-jira-issue-creation

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

GitActions Jira Issue Creation

Git Action to create an Issue in Jira. This action can be used to create an issue when a build fails in a Git Action workflow.

Usage

This action can be used after any other action. Below is simple example on using it:

1. Create a .github/workflows/gitactions-jira-issue-creation.yml

2. Add the following properties to gitactions-jira-issue-creation.yml file

on: push
name: Jira Issue Creation Demo
jobs:
  jiraIssueCreation:
    name: Jira Issue Creation Demo
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Jira Creation Demo
        uses: bryannice/gitactions-jira-issue-creation@master
        env:
          JIRA_ACCOUNT_URL: https://someaccount.atlassian.net/
          JIRA_API_TOKEN: jiraApiToken
          JIRA_ISSUE_ATTACHMENT: log_file.log
          JIRA_ISSUE_DESCRIPTION: Demo'ing Jira Issue Creation
          JIRA_ISSUE_SUMMARY: Demo'ing Jira Issue Creation
          JIRA_ISSUE_TYPE: Demo'ing Jira Issue Creation
          JIRA_PROJECT: jira-issue-creation
          JIRA_USERNAME: user@email.com

Go here for a template yml with all environment variables.

Environment Variables

These are the environment variables that can be set to pass in additional information about the Git Action.

Variable Name Required Description
JIRA_ACCOUNT_URL Yes Base url to the Jira account.
JIRA_API_TOKEN Yes Jira API Token used instead of a password.
JIRA_ISSUE_ATTACHMENT No File to attach to the Jira Issue.
JIRA_ISSUE_DESCRIPTION Yes Body of the Jira Issue.
JIRA_ISSUE_TYPE Yes Type of issue to be created (Bug or Task).
JIRA_ISSUE_SUMMARY Yes Title of the Jira Issue.
JIRA_PROJECT Yes Jira project the ticket will be filed under.
JIRA_USERNAME Yes Jira user email.

JIRA_ISSUE_ATTACHMENT Usage

Git Actions mounts the runner's working directory to /github/workspace as a default and it is controlled by Git Hub's system. Make sure the file being attached is stored in the runner's workspace (it will be in the directory the repo was clone into on the runner). Otherwise, this Git Action will not be able to see the file it needs to attach to the Jira Issue.

Reference

License

GPLv3

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors

Generated from actions/container-action