1
1
mirror of https://github.com/primer/css.git synced 2024-12-29 00:58:31 +03:00

look at match

This commit is contained in:
Jon Rohan 2021-04-02 10:23:11 -07:00
parent 6a4bac084e
commit 506da145e4
No known key found for this signature in database
GPG Key ID: B0BBE304A9A0AECB

View File

@ -16,7 +16,8 @@ jobs:
script: |
const diff_url = context.payload.pull_request.diff_url
const result = await github.request(diff_url)
const match = [...result.data.matchAll(/^\+'@primer\/css':\s(patch|minor|major)/m)].pop()
const match = [...result.data.matchAll(/^\+'@primer\/css':\s(patch|minor|major)/m)][0]
console.log(match)
if (match) {
return match[1]
}