https://github.com/senzing-factory/github-action-jira-issue-creation
https://github.com/senzing-factory/github-action-jira-issue-creation
git-actions senzing-factory
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/senzing-factory/github-action-jira-issue-creation
- Owner: senzing-factory
- License: apache-2.0
- Created: 2020-01-10T21:35:51.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2026-02-02T13:55:50.000Z (about 1 month ago)
- Last Synced: 2026-02-03T02:55:18.480Z (about 1 month ago)
- Topics: git-actions, senzing-factory
- Language: Go
- Homepage:
- Size: 216 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# GitHub Action Jira Issue Creation
GitHub Action to create an Issue in Jira. This action can be used to create an issue when a build fails in a GitHub Action workflow.
## Usage
This action can be used after any other action. Below is simple example on using it:
1\. Create a `.github/workflows/github-action-jira-issue-creation.yml`
2\. Add the following properties to `github-action-jira-issue-creation.yml` file
```yaml
on: push
name: Jira Issue Creation Demo
jobs:
jiraIssueCreation:
name: Jira Issue Creation Demo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Jira Creation Demo
uses: senzing-factory/github-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](deployment/github-actions/template_github_action_jira_issue_creation.yml) 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
- [Creating an API toke for a user.](https://confluence.atlassian.com/cloud/api-tokens-938839638.html)
- [Jira Go Lang Library](https://github.com/andygrunwald/go-jira)
## License
[Apache 2](LICENSE)