Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor updates #11

Merged
merged 3 commits into from
Mar 11, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.2
20.11.1
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Jira pull-request Github action

If the branch name of the current pull request starts with a Jira ticket:
If the branch name of the current pull request or the title starts with a Jira ticket:

- It adds the ticket number to the PR title
- It adds the Jira link to the PR description
- It also adds a preview link to the PR description if provided as `preview-link` input

If the branch name does not start with a Jira ticket:
If the branch name and the PR title does not start with a Jira ticket:

- The workflow will fail

Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:

steps:
- name: Add Jira ticket to PR title / add links to PR description
uses: onrunning/jira-pr-action@v1
uses: onrunning/jira-pr-action@v2
with:
jira-account: account-name
ticket-regex: ^A1C-\\d+
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ inputs:
description: Preview link to add to PR description (i.e. https://preview.example.com)
required: false
runs:
using: node16
using: node20
main: dist/index.js
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test": "jest"
},
"engines": {
"node": "16.13.2",
"node": "20.11.1",
"yarn": ">=1.22.5"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ describe('#pull-request', () => {

it('sets failed status', () => {
expect(setFailedSpy).toHaveBeenCalledWith(
expect.stringContaining('branch name does not start with a Jira ticket')
expect.stringContaining('Neither current branch nor title start with a Jira ticket')
)
})

Expand Down Expand Up @@ -598,7 +598,7 @@ describe('#pull-request', () => {

it('sets failed status', () => {
expect(setFailedSpy).toHaveBeenCalledWith(
expect.stringContaining('branch name does not start with a Jira ticket')
expect.stringContaining('Neither current branch nor title start with a Jira ticket')
)
})

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async function run(): Promise<void> {

if (!isException) {
const regexStr = ticketRegex.toString()
core.setFailed(`The current branch name does not start with a Jira ticket ${regexStr}.`)
core.setFailed(`Neither current branch nor title start with a Jira ticket ${regexStr}.`)
}
}
if (prPreviewLine || ticketLine) {
Expand Down
Loading