-
Notifications
You must be signed in to change notification settings - Fork 3.5k
41 lines (39 loc) · 1.89 KB
/
label-needs-port.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
name: Create Issue when Needs Port label is added
on:
issues:
types: [labeled]
pull_request_target:
types: [labeled]
jobs:
create_issue:
if: contains(github.event.pull_request.labels.*.name, 'needs_port_to_dotnet') || contains(github.event.pull_request.labels.*.name, 'needs_port_to_python') || contains(github.event.issue.labels.*.name, 'needs_port_to_dotnet') || contains(github.event.issue.labels.*.name, 'needs_port_to_python')
name: "Create Issue"
continue-on-error: true
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: read
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
steps:
- name: Create dotnet issue
if: contains(github.event.pull_request.labels.*.name, 'needs_port_to_dotnet') || contains(github.event.issue.labels.*.name, 'needs_port_to_dotnet')
run: |
new_issue_url=$(gh issue create \
--title "Port python feature: ${{ github.event.issue.title || github.event.pull_request.title }}" \
--label ".NET" \
--body "# Original issue
${{ github.event.issue.html_url || github.event.pull_request.html_url }}
## Description
${{ github.event.issue.body || github.event.pull_request.body }}")
- name: Create python issue
if: contains(github.event.pull_request.labels.*.name, 'needs_port_to_python') || contains(github.event.issue.labels.*.name, 'needs_port_to_python')
run: |
new_issue_url=$(gh issue create \
--title "Port dotnet feature: ${{ github.event.issue.title || github.event.pull_request.title }}" \
--label "python" \
--body "# Original issue
${{ github.event.issue.html_url || github.event.pull_request.html_url }}
## Description
${{ github.event.issue.body || github.event.pull_request.body }}")