Git Action to create an Issue on a GitHub Repo. This action can be used to create an issue when a build fails in a Git Action workflow.
This action can be used after any other action. Below is simple example on using it:
1. Create a .github/workflows/git-issue-creation.yml
2. Add the following properties to git-issue-creation.yml
file
on: push
name: Git Creation Demo
jobs:
gitIssueCreation:
name: Git Creation Demo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Git Creation Demo
uses: bryannice/gitactions-git-issue-creation@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_COMMIT_SHA: ${{ github.sha }}
GITHUB_REPO_OWNER: 'bryan-nice'
GITHUB_REPO_NAME: 'github-issue-creation'
GITHUB_ISSUE_TITLE: 'Demo''ing Git Issue Creation'
GITHUB_ISSUE_BODY: 'Demo''ing Git Issue Creation'
Go here for a template yml with all environment variables.
These are the environment variables that can be set to pass in additional information about the Git Action.
Variable Name | Required | Description |
GITHUB_TOKEN | Yes | The GitHub access token used by Git Actions workflow. Can use the native token generated by Git Actions or create a custom secret. |
GITHUB_SHA | Yes | The commit SHA associated to running the Git Action workflow. |
GITHUB_OWNER | Yes | The owner of the repo which is normally seen in the URI as a prefix to the repo. |
GITHUB_REPOSITORY | Yes | The name of the repository. |
GITHUB_ISSUE_TITLE | Yes | Title of the issue to be created. |
GITHUB_ISSUE_BODY | Yes | Body of the issue to be created. |
- Using environment variables lists the default environment variables set in Git Actions.
- Authenticating with the GITHUB_TOKEN