Skip to content

Commit e8f27c4

Browse files
committed
feat: update link text from 'PR' to 'PR (#number)'
1 parent 8483fcf commit e8f27c4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/pr-2-jira.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name PR-2-Jira: GitHub & Jira Integration
33
// @namespace https://github.com/scharinger/userscripts
4-
// @version 2.5
4+
// @version 2.6
55
// @description Seamlessly connect GitHub PRs to Jira with smart button placement and automatic link creation
66
// @author Tim Scharinger
77
// @match https://*/*/pull/*
@@ -227,7 +227,9 @@
227227
return
228228
}
229229
console.log(`${PREFIX} starting Jira functionality`, { issueKey, prLink })
230-
addPRLink(issueKey, prLink)
230+
const prNumber = prLink.match(/\/pull\/(\d+)/)?.[1]
231+
const prTitle = prNumber ? `PR (#${prNumber})` : 'PR'
232+
addPRLink(issueKey, prLink, prTitle)
231233
}
232234

233235
async function addPRLink(

0 commit comments

Comments
 (0)