forked from refined-github/refined-github
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.17 KB
/
features.yml
File metadata and controls
37 lines (32 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Feature
on:
pull_request:
types:
- opened
- edited
- synchronize # push
path:
- source/refined-github.ts
jobs:
New:
outputs:
name: ${{ steps.name.outputs.first_match }}
runs-on: ubuntu-latest
if: startsWith(github.event.pull_request.title, 'Add') && endsWith(github.event.pull_request.title, 'feature')
steps:
- uses: actions/checkout@v2
- name: Find feature name
id: name
uses: AsasInnab/regex-action@v1
with:
regex_pattern: '(?<=Add `)[a-z-]+(?=` feature)'
regex_flags: g
search_string: ${{ github.event.pull_request.title }}
- name: Has `${{ steps.name.outputs.first_match }}.tsx` been created?
uses: mudlabs/simple-diff@v1.2.0
with:
path: source/features/${{ steps.name.outputs.first_match }}.tsx
- name: Has `${{ steps.name.outputs.first_match }}` been imported?
run: grep "import './features/${{ steps.name.outputs.first_match }}';" source/refined-github.ts -q
- name: Has `${{ steps.name.outputs.first_match }}` been documented?
run: grep '"${{ steps.name.outputs.first_match }}"' readme.md -q