-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (41 loc) · 1.52 KB
/
issue-gherkin.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
name: Create Gherkin Feature from Issue
on:
issues:
types:
- opened
jobs:
create-feature:
if: contains(github.event.issue.labels.*.name, 'gherkin')
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Extract feature content
id: feature
uses: bcgov-nr/[email protected]
with:
issue: ${{ github.event.issue.number }}
default_title: "[Test Case]: REPLACE WITH YOUR TEST CASE TITLE"
update_title: true
- name: Create feature file
run: echo "${{ steps.feature.outputs.feature }}" > cypress/cypress/e2e/upt_${{ github.event.issue.number }}.feature
- name: Commit & Push changes
uses: Andro999b/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: test/upt_${{ github.event.issue.number }}
force: true
message: |
test(upt #${{ github.event.issue.number }}): ${{ steps.feature.outputs.title }}
Closes #${{ github.event.issue.number }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
branch: test/upt_${{ github.event.issue.number }}
title: "test(upt #${{ github.event.issue.number }}): ${{ steps.feature.outputs.title }}"
body: |
${{ github.event.issue.body }}
Closes #${{ github.event.issue.number }}