Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
61 changes: 54 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,58 @@ This is a collection of various reusable GitHub actions used by Heartland Retail
Publishes the JUnit test result file to DataDog

```yml
- uses: springboard-retail/github-actions/publish-test-results
with:
name: heartland-retail-cool-new-test-suite
junit_file_path: ./test-results.xml
tags: env:ci,app:my-app
datadog_api_token: ${{ secrets.DD_OPS_API_KEY }}
if: always()
- uses: springboard-retail/github-actions/publish-test-results
with:
name: heartland-retail-cool-new-test-suite
junit_file_path: ./test-results.xml
tags: env:ci,app:my-app
datadog_api_token: ${{ secrets.DD_OPS_API_KEY }}
if: always()
```

### get-jira-issues

See [get-jira-issues/action.yml](get-jira-issues/action.yml)

Retrieves matching Jira issue numbers from commit messages

```yml
- uses: springboard-retail/github-actions/get-jira-issues
with:
jira_prefixes: 'HRTL,FORT'
github_token: ${{ secrets.GITHUB_TOKEN }}
```

If you plan to run this action from a different repo than you want to retrieve the results, you can also pass

- `repository` (owner/repo)
- `base_branch`
- `target_branch`

This will provide two outputs

- `jira_issues`: A JSON array containing the unique issue numbers
- `jira_issues_string`: A newline separated string contianing a sorted unique list of issue numbers

### update-pr-description

See [update-pr-description/action.yml](update-pr-description/action.yml)

Updates the PR description with the new contents, optionally replacing existing matching content.

```yml
- uses: springboard-retail/github-actions/update-pr-description
with:
match_regex: '<!-- JIRA_ISSUES -->[\s\S]*<!-- JIRA_ISSUES_END -->'
new_content: |
<!-- JIRA_ISSUES -->
## Jira Tickets Connected to this Release
${{ steps.get_jira_issues.outputs.jira_issues_string }}
<!-- JIRA_ISSUES_END -->
github_token: ${{ secrets.GITHUB_TOKEN }}
```

If you plan to run this action from a different repo, you can optionally pass

- `repository` (owner/repo)
- `pr_number`
26 changes: 26 additions & 0 deletions get-jira-issues/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Get Jira issues'
description: 'Parse Jira issue numbers from commit messages between base and target branches'

inputs:
repository:
description: 'Repository name in format owner/repo'
base_branch:
description: Base branch for comparison
target_branch:
description: Target branch to compare against base branch
jira_prefixes:
description: 'Comma separated list of Jira prefixes'
required: true
github_token:
description: GitHub token
required: true

outputs:
jira_issues:
description: 'JSON containing array of Jira issues'
jira_issues_string:
description: 'String containing Jira issues separated by newlines'

runs:
using: node20
main: ../lib/get-jira-issues.js
1 change: 1 addition & 0 deletions node_modules/.bin/uuid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

243 changes: 243 additions & 0 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions node_modules/@actions/core/LICENSE.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading