• Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    Ruby
  • Created over 7 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Export pull requests and/or issues to a CSV file. Supports GitHub, GitLab, and Bitbucket

Export Pull Requests

Export pull requests/merge requests and/or issues to a CSV file.

Supports GitHub, GitLab, and Bitbucket.

Installation

Ruby is required. With Ruby installed run:

gem install export-pull-requests

This installs the epr executable.

Usage

usage: epr [options] user/repo1 [user/repo2...]
    -b, --body                       Include the issue/pr body description in the output (GitHub only)
    -c, --creator=USER1,USER2,...    Export PRs created by given username(s); prepend `!' to exclude user
    -e, --endpoint=URL               Endpoint URL for 'enterprise', etc... repositories
    -m, --milestone=WHAT             Export items assigned to the given milestone (GitHub/GitLab only)
    -a, --assignee=USER              Export items assigned to the given user (GitHub/GitLab only)
    -l, --labels=LABEL(S)            Export items with the given label(s) (GitHub/GitLab only)
    -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

Config

These can all be set by one of the below methods or via the command line.

Token

The API token can be set by:

  • EPR_TOKEN environment variable
  • epr.token setting in .gitconfig (add via git config --add epr.token <your API token>)
  • github.oauth-token setting in .gitconfig

Default Service

github is the default. You can set a new default via EPR_SERVICE.

Examples

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

Service Notes

To connect to a custom/"Enterprise" installation of any of the supported services use the endpoint option (-e).

The provided URL must point the API endpoint, not the user-facing site. For GitHub this is http(s)://YOUR-SITE/api/v3.

Bitbucket

Due to various issues with the Bitbucket gem support for Bitbucket requires using a Ruby version < 3 and manually installing the Bitbucket library via gem install bitbucket_rest_api.

Alternatively, on a Ruby version < 3 you can run: gem install export-pull-requests -v=0.3.7

You can use app passwords for the API token. Just provide your token info in bitbucket_username:app_password format:

epr -p bitbucket -t bitbucket_username:app_password user/repo1

GitLab

Authentication can be done via a personal access token.

Enterprise editions of GitLab have an issue export feature.

See Also

  • Batch Labels - Add/remove labels in batches to/from GitHub issues and pull requests.

Author

Skye Shaw [skye.shaw AT gmail]

License

Released under the MIT License: www.opensource.org/licenses/MIT


Made by ScreenStaring

More Repositories

1

git-link

Emacs package to get the GitHub/Bitbucket/GitLab/... URL for a buffer location
Emacs Lisp
394
star
2

copy-as-format

Emacs function to copy buffer locations as GitHub/Slack/JIRA etc... formatted code
Emacs Lisp
138
star
3

itunes_store_transporter

Upload and manage your assets in the iTunes Store using the iTunes Store’s Transporter (iTMSTransporter).
Ruby
118
star
4

itunes_store_transporter_web

iTunes Store Transporter GUI: GUI and workflow automation for the iTunes Store’s Transporter (iTMSTransporter)
Ruby
80
star
5

yymmdd

Tiny DSL for idiomatic date parsing and formatting in Ruby
Ruby
77
star
6

normalize_country

Convert country names and codes to a standard.
Ruby
67
star
7

ddex

DDEX metadata serialization for Ruby
Ruby
53
star
8

build-status

Emacs minor mode that monitors and shows a buffer's build status in the mode line.
Emacs Lisp
27
star
9

class2

Easily create Ruby class hierarchies that support nested attributes, type conversion, serialization, equality, and more.
Ruby
14
star
10

output-as-format

Output stdin as GitHub/Slack/Jira etc... formatted code, lists, or quotes
Perl
13
star
11

jaxb2ruby

Generate pure Ruby objects from an XML schema (XSD) using JAXB and JRuby. Use your favorite XML to object mapper or a custom ERB template.
Ruby
12
star
12

batchlabels

Add or remove labels in batches to/from GitHub issues and pull requests.
Go
8
star
13

angry_raise

raise Ruby exceptions, with emotion and intensity
Ruby
6
star
14

optout

The opposite of getopt(): validate an option hash and turn it into something appropriate for exec() and system()-like functions
Ruby
5
star
15

URI-fasp

URI handler for Aspera's FASP protocol
Perl
5
star
16

transform_legacy_attribute_methods

A Rails plugin that allows you to transform your ActiveRecord model's "legacy" attribute methods into attribute aliases that can be used in dynamic finders and attribute hashes.
Ruby
5
star
17

Time-Timecode

Video timecode class for Perl and command line program. Supports any frame rate, conversions, drop/non-drop frame counts and more.
Perl
5
star
18

issue-link

Get the link to JIRA/Tracker/GitHub issues. Turn bug/feature/issue IDs into links.
Emacs Lisp
4
star
19

ruby-factory-mode

Emacs minor mode for Ruby test object generation libraries
Emacs Lisp
3
star
20

Mojolicious-Plugin-FormFields

Use objects and data structures in your forms
Perl
3
star
21

dotfiles

My dotfiles. Everything but Emacs, which has its own repository: https://github.com/sshaw/emacs.d
Shell
3
star
22

ruby-jing

RELAX NG schema validation in Ruby using the Jing CLI
Ruby
3
star
23

xslt-timecode

A pure, dependency free, XSLT 1.0 library for video timecode manipulation
XSLT
2
star
24

glc

The GitHub Link Checker. Monitor GitHub activity for links that aren't permanent, and do something.
Go
2
star
25

interrobang

Did the method end with "?" or "!"‽ Interrobang gives you the best of both worlds‽
Ruby
2
star
26

selfie_formatter

The RSpec Selfie Formatter: A Formatter that takes photos of you while your tests run and uses them to track progress and format the results.
Ruby
2
star
27

jquery-selectunique

Given a group of select fields with the same options, SelectUnique will remove an option from the other select fields when it's selected, and put it back when it's changed.
JavaScript
2
star
28

Mojolicious-Plugin-ParamExpand

Turns request parameters into nested data structures using CGI::Expand.
Perl
1
star
29

logging-honeybadger

Honeybadger appender for the Logging gem
Ruby
1
star
30

logging-appenders-airbrake

Airbrake appender for the Logging gem
Ruby
1
star
31

markdown_usage

Output a colorized version of your program's usage using a Markdown document embedded in your script, from your project's README, or anywhere else.
Ruby
1
star
32

page_number

Page number validation. Utility methods for pagination page and per page that make sure you'll always have a valid number
Ruby
1
star
33

require3

Kernel#require something and make it accessible via a different namespace.
Ruby
1
star
34

alias2

Make classes, modules, and constants accessible via a different namespace.
Ruby
1
star
35

keep_defaults

Prevent ActiveRecord attributes for not null columns with default values from being set to nil.
Ruby
1
star
36

emacs.d

My Emacs config
Emacs Lisp
1
star
37

select-unique

Given a group of HTML select elements with the same options, Select Unique will remove an option from the other select elements when it's selected, and put it back when it's changed.
JavaScript
1
star
38

Mojolicious-Command-secret

Generate a secret() using random bytes and add it to your app
Perl
1
star
39

Mojolicious-Plugin-DigestAuth

HTTP Digest Authentication for Mojolicious
Perl
1
star