Export pull requests/merge requests and/or issues to a CSV file.
Supports GitHub, GitLab, and Bitbucket.
Ruby is required.
With Ruby installed run:
gem install export-pull-requests
This installs the epr
executable.
usage: epr [-bhv] [-e url] [-s state] [-t token] [-c user1,user2...] user/repo1 [user/repo2...]
-b, --body Include the issue/pr body description in the output
-c, --creator=USER1,USER2,... Export PRs created by given username(s); prepend `!' to exclude user
-e, --endpoint=URL Endpoint URL for 'enterprise', etc... repositories
-h, --help Show this message
-p, --provider=NAME Service provider: bitbucket, github, or gitlab; defaults to github
-s, --state=STATE Export items in the given state, defaults to open
-t, --token=TOKEN API token
-x, --export=WHAT What to export: pr, issues, or all; defaults to all
-v, --version epr version
These can all be set by one of the below methods or via the command line.
The API token can be set by:
EPR_TOKEN
environment variableepr.token
setting in.gitconfig
(add viagit config --add epr.token <your API token>
)github.oauth-token
setting in.gitconfig
github is the default. You can set a new default via EPR_SERVICE
.
Export open PRs and issues in sshaw/git-link
and sshaw/itunes_store_transporter
:
epr sshaw/git-link sshaw/itunes_store_transporter > pr.csv
Export open pull request not created by sshaw
in padrino/padrino-framework
:
epr -x pr -c '!sshaw' padrino/padrino-framework > pr.csv
Export open merge requests from a GitLab project:
epr -x pr -p gitlab gitlab-org/gitlab-ce > pr.csv
Export all issues from a GitLab project:
epr -x issues -p gitlab gitlab-org/gitlab-ce > pr.csv
To connect to a custom/"Enterprise" installation of any of the supported services use the endpoint option (-e
)
You can use app passwords for the API token.
Just provide your token HTTP Auth style using: username:app_password
.
Authentication can be done via a personal access token.
Enterprise editions of GitLab have an issue export feature.
Skye Shaw [skye.shaw AT gmail]
Released under the MIT License: www.opensource.org/licenses/MIT
Made by ScreenStaring