A github actions example to extract issues of the repo itself
See original GitHub issueThank you for your great work.
I add my github actions example here, in case someone needs it.
it backups all issues every day.
Because it only backup the issues belong to the repository that contains this workflow. It does not limit by the GitHub API rate.
# gh2md log:
...
Writing to file: issues.md
Github API rate limit: RateLimit(core=Rate(reset=2020-09-17 02:50:05, remaining=977, limit=1000))
Done.
# .github/workflows/issues2md.yml
name: Issues2Markdown
on:
push: # comment it to reduce update.
schedule:
# every day
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Backup github issues to a markdown file.
run: |
pip3 install --user --upgrade setuptools
pip3 install --user gh2md
$HOME/.local/bin/gh2md $GITHUB_REPOSITORY issues.md --token ${{ secrets.GITHUB_TOKEN }}
git add issues.md
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Backup all issues into issues.md" -a
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:9 (8 by maintainers)
Top Results From Across the Web
TODO to Issue · Actions · GitHub Marketplace
This action will convert newly committed TODO comments to GitHub issues on push. It will also optionally close the issues if the TODOs...
Read more >Features • GitHub Actions
Automate your workflow from idea to production. GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build,...
Read more >actions/checkout: Action for checking out a repo - GitHub
This action checks-out your repository under $GITHUB_WORKSPACE , so your workflow can access it. Only a single commit is fetched by default, for...
Read more >Creating an issue - GitHub Docs
On GitHub.com, navigate to the main page of the repository. Under your repository name, click Issues. Issues tab. Click New issue.
Read more >Monitoring and troubleshooting self-hosted runners
In the left sidebar, click Actions, then click Runners. Under "Runners", you can view a list ... For example, --url https://github.com/octo-org/octo-repo .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m gonna close this issue just so I know that there’s no work to do on it. Will leave it pinned though.
@mattduck
gh2mdworks well. If I found any problems or features I will open a issues for it.My purpose is to backup my repo with issues.
And the issues is readable even when I do not has access to github.com.
Combining
gh2mdandpandoc --self-containedserved my purpose.(I am not test other tools yet, this may not be the best way to do this.)
Here is a script to setup crontab to fetch repos and convert
issues.mdtoissues.html.