git-action-jira-issue-creation

command module
v0.0.0-...-d0d99a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

Git Action 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/git-action-jira-issue-creation.yml

2. Add the following properties to git-action-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: senzing/git-action-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 repository 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

Apache 2

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL