Skip to content

Instantly share code, notes, and snippets.

@crazy-max
Last active May 26, 2020 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crazy-max/5023833a70557be4bf5707c8bac9f9e3 to your computer and use it in GitHub Desktop.
Save crazy-max/5023833a70557be4bf5707c8bac9f9e3 to your computer and use it in GitHub Desktop.
bdougieYo Issues Grab
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