Last active
May 26, 2020 22:20
-
-
Save crazy-max/5023833a70557be4bf5707c8bac9f9e3 to your computer and use it in GitHub Desktop.
bdougieYo Issues Grab
This file contains hidden or 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: issues | |
on: | |
push: | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Fetch issues | |
uses: actions/github-script@v1 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
const response = await octokit.paginate( | |
octokit.issues.listForRepo.endpoint.merge({ | |
...github.context.repo | |
}) | |
); | |
const fileHandle = await fs.open("issues.json", 'w'); | |
await fileHandle.writeFile(JSON.stringify(response)); | |
await fileHandle.close(); | |
- | |
name: Create Pull Request | |
uses: peter-evans/create-pull-request@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "chore: gen issues" | |
title: "chore: gen issues" | |
body: | | |
JSONify issues | |
branch: gen-issues | |
branch-suffix: timestamp | |
labels: automerge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment