https://github.com/smartthingscommunity/github-actions
A library of reusable workflows
https://github.com/smartthingscommunity/github-actions
Last synced: 5 months ago
JSON representation
A library of reusable workflows
- Host: GitHub
- URL: https://github.com/smartthingscommunity/github-actions
- Owner: SmartThingsCommunity
- Created: 2022-01-21T20:33:41.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-26T18:39:59.000Z (about 4 years ago)
- Last Synced: 2024-12-28T03:23:49.739Z (about 1 year ago)
- Size: 2.93 KB
- Stars: 3
- Watchers: 47
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# github-actions
## [Issue to Jira When Labeled](.github/workflows/create-jira-issue.yaml)
Clone a GitHub issue in Jira when a specific label is added.
### Usage
Create a yaml file containing the following at `.github/workflows/create-jira-issue.yaml`
```yaml
on:
issues:
types: [labeled]
name: Create Jira Issue
jobs:
create-jira-issue:
uses: SmartThingsCommunity/github-actions/.github/workflows/create-jira-issue.yaml@main
with:
trigger-label: example
project: EXAMPLE
fields: '{"labels": ["ex-github"],"components": [{"id": "10000"}]}'
secrets:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
```
The above would create a Jira issue under the "EXAMPLE" project when the `example` label is added to a GitHub issue.
#### Inputs
`trigger-label`: The GitHub label that will trigger the workflow when added to an issue.
For all other inputs/secrets/outputs above, see [Jira Login](https://github.com/atlassian/gajira-login) and [Jira Create](https://github.com/atlassian/gajira-create).