Title 1 #1
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
name: Issue Operations | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
comment-and-create-issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Comment on the issue | |
uses: actions/github-script@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
github.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: 'Thank you for opening this issue! We will look into it.' | |
}) | |
- name: Create an issue in code repository | |
uses: actions/github-script@v2 | |
with: | |
github-token: ${{ secrets.TOKEN }} | |
script: | | |
github.issues.create({ | |
owner: context.repo.owner, | |
repo: 'vyos', | |
title: `New issue from ${context.repo.repo}`, | |
body: `Issue opened by @${context.actor} in ${context.repo.repo}:\n${context.payload.issue.html_url}` | |
}) | |