Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gbh-tech/get-ticket-id-action
Gets the Jira ticket ID from a branch name used in a workflow.
https://github.com/gbh-tech/get-ticket-id-action
action branch git github id jira ticket utilities
Last synced: about 22 hours ago
JSON representation
Gets the Jira ticket ID from a branch name used in a workflow.
- Host: GitHub
- URL: https://github.com/gbh-tech/get-ticket-id-action
- Owner: gbh-tech
- License: mit
- Created: 2024-03-02T18:44:01.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-05-24T20:54:00.000Z (8 months ago)
- Last Synced: 2024-11-18T20:44:08.491Z (2 months ago)
- Topics: action, branch, git, github, id, jira, ticket, utilities
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT
Awesome Lists containing this project
README
# Get Ticket ID Action
## Content
- [Overview](#overview)
- [Usage](#usage)
- [Examples](#examples)## Overview
This GitHub Action facilitates getting the ticket ID from a branch name used
in a workflow. If you have a branch with a similar name to:```text
TK-123-fix-for-README-file
```This action will be able to output the string `TK-123`, then re-use it in your
other workflow steps or jobs.## Usage
See [action.yml](action.yml) for more info about the action.
```yaml
- uses: gbh-tech/get-ticket-id-action@v1
with:
# Optional. Specifies the git ref to use to obtain the ticket ID.
# Defaults: github.head_ref, github.ref_name
ref: ''
```> 💡 Check the official documentation on the [github context] to learn more
> about the values of `github.head_ref` and `github.ref_name`.### Examples
```yaml
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gbh-tech/get-ticket-id-action@v1
id: get-ticket-id
- name: Show the discovered ticket ID
env:
TICKET_ID: ${{ steps.get-ticket-id.outputs.ticket-id }}
run: echo "Ticket ID is ${TICKET_ID}"
```[github context]: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context