mirror of
https://github.com/SethCohen/github-releases-to-discord
synced 2026-09-14 20:13:23 +00:00
Adds usernames to formatDescription (#28)
* Adds usernames to formatDescription * Formatting
This commit is contained in:
@@ -31,6 +31,7 @@ const formatDescription = (description) => {
|
|||||||
const nlCount = (ws.match(/\n/g) || []).length
|
const nlCount = (ws.match(/\n/g) || []).length
|
||||||
return nlCount >= 2 ? '\n\n' : '\n'
|
return nlCount >= 2 ? '\n\n' : '\n'
|
||||||
})
|
})
|
||||||
|
.replace(/@(\S+)/g, (match, name) => { return `[@${name}](https://github.com/${name})` })
|
||||||
.trim()
|
.trim()
|
||||||
|
|
||||||
if (core.getBooleanInput('reduce_headings')) {
|
if (core.getBooleanInput('reduce_headings')) {
|
||||||
@@ -174,4 +175,4 @@ async function run () {
|
|||||||
|
|
||||||
run()
|
run()
|
||||||
.then(() => {core.info('Action completed successfully')})
|
.then(() => {core.info('Action completed successfully')})
|
||||||
.catch(err => {core.setFailed(err.message)})
|
.catch(err => {core.setFailed(err.message)})
|
||||||
|
|||||||
Reference in New Issue
Block a user