mirror of
https://github.com/primer/css.git
synced 2024-11-30 19:53:11 +03:00
Creating a label workflow
id is part of step matching changeset syntax error zero index output unfurl log match multiline match[1] match[0] unfurl match 0 1 remove log
This commit is contained in:
parent
a71def926f
commit
251c3868e8
5
.changeset/twelve-cameras-drive.md
Normal file
5
.changeset/twelve-cameras-drive.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'@primer/css': patch
|
||||
---
|
||||
|
||||
Label workflow
|
21
.github/workflows/labeler.yml
vendored
Normal file
21
.github/workflows/labeler.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
name: Labeler
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, edited]
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v3
|
||||
id: version-result
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
result-encoding: string
|
||||
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)]
|
||||
if (match) {
|
||||
return match[0][1]
|
||||
}
|
Loading…
Reference in New Issue
Block a user