linz / github-backup-scripts

scripts for taking GitHub backups
0 stars 0 forks source link

Improve GitHub backup scripts backing up of issues #2

Open linzadmin opened 7 years ago

linzadmin commented 7 years ago

Issue by SPlanzer 2017-10-31 Originally opened as https://github.com/linz/ds-dev-team/issues/26


Concerning issues - The current github backup script only takes the body of the issue but not the comments.

This should be improved to also back up the comments

linzadmin commented 7 years ago

Comment by imincik 2017-10-31


Thanks @SPlanzer for rising this

palmerj commented 5 years ago

@SPlanzer would it take much to implement this?

Looking at the API docs all we would need to do is add a JSON file per issue to the tarball by calling:

${GHBU_API}/repos/${GHBU_ORG}/${REPO}/issues/${ISSUE}/comments

We could also add labels:

${GHBU_API}/repos/${GHBU_ORG}/${REPO}/issues/${ISSUE}/labels

I would think this is very easy to do with some sort of bash loop.

Also I think we are only doing a backup open issues. See https://developer.github.com/v3/issues/#parameters We need to change the command to check curl --silent -u $GHBU_UNAME:$GHBU_PASSWD ${GHBU_API}/repos/${GHBU_ORG}/${REPO}/issues\?state\=all. By adding this filter we will also backup pull requests.

\cc @imincik