[Request] Create templates for new rule requests #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
issues: | |
types: [opened] | |
name: Duplicate Open Issue to Internal Repo | |
jobs: | |
post_new_issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Duplicate issue to internal behavior repo | |
uses: octokit/request-action@v2.x | |
if: contains(github.event.issue.labels.*.name, 'behavior') | |
with: | |
route: POST /repos/{owner}/{repo}/issues | |
owner: elastic | |
repo: endpoint-rules | |
title: "${{ toJSON(format('{0} {1}', '[Openness Issue]', github.event.issue.title ))}}" | |
body: ${{toJSON(github.event.issue.body)}} | |
labels: ${{toJSON(github.event.issue.labels)}} | |
env: | |
GITHUB_TOKEN: ${{ secrets.PROTECTIONS_MACHINE_TOKEN }} | |
- name: Duplicate issue to internal yara repo | |
uses: octokit/request-action@v2.x | |
if: contains(github.event.issue.labels.*.name, 'yara') | |
with: | |
route: POST /repos/{owner}/{repo}/issues | |
owner: elastic | |
repo: protections-yara-rules | |
title: "${{ toJSON(format('{0} {1}', '[Openness Issue]', github.event.issue.title ))}}" | |
body: ${{toJSON(github.event.issue.body)}} | |
labels: ${{toJSON(github.event.issue.labels)}} | |
env: | |
GITHUB_TOKEN: ${{ secrets.PROTECTIONS_MACHINE_TOKEN }} | |
- name: Duplicate issue to internal ransomware repo | |
uses: octokit/request-action@v2.x | |
if: contains(github.event.issue.labels.*.name, 'ransomware') | |
with: | |
route: POST /repos/{owner}/{repo}/issues | |
owner: elastic | |
repo: protections-ransomware | |
title: "${{ toJSON(format('{0} {1}', '[Openness Issue]', github.event.issue.title ))}}" | |
body: "${{ toJSON(format('*Issue link*:\n{0}\n{1}', github.event.issue.html_url, github.event.issue.body ))}}" | |
labels: ${{toJSON(github.event.issue.labels)}} | |
env: | |
GITHUB_TOKEN: ${{ secrets.PROTECTIONS_MACHINE_TOKEN }} |