Skip to content

Commit 48a7e64

Browse files
author
Your Name
committed
♦️ - New Release
- Fix for Authenticating with the new GitHub API changes - Improved formatting of the `-l` list output - Updated the README - Added Screenshots - Added coloring for the label list - New release version 1.0.2 Changes: modified: .gitignore modified: CHANGELOG.md modified: Gemfile modified: README.md modified: docs/ISSUE_TEMPLATE.md new file: docs/screen1.png new file: docs/screen2.png modified: gh-missue.rb
1 parent 39fd8ab commit 48a7e64

8 files changed

+257
-97
lines changed

.gitignore

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1+
# Lock files
12
Gemfile.lock
2-
docs/
3+
4+
# Setuptools distribution folders
5+
/dist/
6+
/build/
7+
8+
# git
9+
/.git/
10+
11+
# various dev junk
12+
/junk/

CHANGELOG.md

+25-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
### The gh-missue Change Log
2-
3-
All notable changes to this project will be documented in this file.
4-
5-
**Q**: *Why keep a changelog?*
6-
**A**: [BECAUSE](http://keepachangelog.com/en/1.0.0/)
7-
8-
**Q**: *How?*
9-
**A**: By carefully describing what was: *added, fixed*, and *changed*.
10-
11-
---
12-
13-
14-
#### [1.0.1] - 2018-04-10
15-
16-
- First new commits
17-
- No previous changelog available
1+
### The gh-missue Change Log
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
**Q**: *Why keep a changelog?*
6+
**A**: [BECAUSE](http://keepachangelog.com/en/1.0.0/)
7+
8+
**Q**: *How?*
9+
**A**: By carefully describing what was: *added, fixed*, and *changed*.
10+
11+
---
12+
13+
#### [1.0.2] - 2022-01-25
14+
15+
- Fix for Authenticating with the new GitHub API changes
16+
- Improved formatting of the `-l` list output
17+
- Updated the README
18+
- Added Screenshots
19+
- Added coloring for the label list
20+
21+
22+
#### [1.0.1] - 2018-04-10
23+
24+
- First new commits
25+
- No previous changelog available

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
#ruby "2.3"
3+
#ruby "3.1"
44

55
gem "octokit"
66
gem "docopt"

README.md

+92-30
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ A complete GitHub issue migration CLI tool written in Ruby.
1111

1212
| STATUS: | Version | Date | Maintained? |
1313
|:------- |:------- |:---- |:----------- |
14-
| Working | `1.0.1` | 2018-04-10 | YES |
14+
| Working | `1.0.2` | 2022-01-25 | YES |
15+
1516

1617
---
1718

@@ -67,6 +68,15 @@ please send me a PR.
6768

6869
---
6970

71+
#### Screenshots!
72+
73+
![Full](./docs/screen1.png "gh-missue like a boss!)
74+
<sub>(FFS always include a screenshot in your GitHub repo!)</sub>
75+
76+
![Full](./docs/screen2.png "xxx")
77+
<!-- ![Full](./docs/screen3.png "xxx") -->
78+
79+
7080
### Dependencies
7181

7282
This tool depends on:
@@ -77,13 +87,79 @@ This tool depends on:
7787

7888
### Installation
7989

80-
8190
1. To make this run, you need to:
82-
(a) have Ruby installed
83-
(b) gem install GitHubs own "octokit" library
84-
(c) gem install the option parser "docopt"
85-
2. You should also consider creating a personal authentication token on GitHub,
86-
to avoid getting rate-limited by a large number of requests in short time.
91+
(a) Manually install the `WITHOUT DEVKIT` version of Ruby from [here](https://rubyinstaller.org/downloads/), or use:
92+
`winget install ruby`
93+
(b) `gem install octokit`
94+
(c) `gem install docopt`
95+
(d) Clone this repo:
96+
`git clone https://github.com/E3V3A/gh-missue.git`
97+
98+
2. You also **have to** create a personal authentication token for your GitHub
99+
account. This is needed to be able to push the new issues and labels into
100+
your own repos. It also avoid you getting rate-limited by a large number
101+
of requests in short time. Learn how to do this [here]().
102+
103+
3. Run and test the app with:
104+
105+
```Ruby
106+
# check version:
107+
ruby.exe -V
108+
109+
# List the current open issues (and labels) for this repo:
110+
ruby.exe .\gh-missue.rb -l open "YOUR_40_CHAR_OATH2_TOKEN" "E3V3A/gh-missue"
111+
112+
# Same as above, but with some more Warnings & Debug output:
113+
ruby.exe -W2 .\gh-missue.rb -d -l open "YOUR_40_CHAR_OATH2_TOKEN" "E3V3A/gh-missue"
114+
115+
# Check your current gitHub API Rate Limits:
116+
ruby.exe .\gh-missue.rb -r "YOUR_40_CHAR_OATH2_TOKEN"
117+
```
118+
119+
### Usage
120+
121+
```
122+
$ ruby.exe .\gh-missue.rb -h
123+
124+
Description:
125+
126+
gh-missue is a Ruby program that migrate issues from one github repository to another.
127+
Please note that you can only migrate issues to your own repo, unless you have an OAuth2
128+
authentication token.
129+
130+
Usage:
131+
./gh-missue.rb [-c | -n <ilist> | -t <itype>] <source_repo> <target_repo>
132+
./gh-missue.rb [-c | -n <ilist> | -t <itype>] <oauth2_token> <source_repo> <target_repo>
133+
./gh-missue.rb [-c | -n <ilist> | -t <itype>] <username> <password> <source_repo> <target_repo>
134+
./gh-missue.rb [-d] -l <itype> [<oauth2_token>] <repo>
135+
./gh-missue.rb -n <ilist>
136+
./gh-missue.rb -t <itype>
137+
./gh-missue.rb [-d] -r [<oauth2_token>]
138+
./gh-missue.rb -d
139+
./gh-missue.rb -v
140+
./gh-missue.rb -h
141+
142+
Options:
143+
144+
-c - only copy all issue labels from <source> to <target> repos, including name, color and description
145+
-l <itype> <repo> - list available issues of type <itype> (all,open,closed) and all labels in repository <repo>
146+
-t <itype> - specify what type (all,open,closed) of issues to migrate. [default: open]
147+
-r - show current rate limit and authentication method for your IP
148+
-d - show debug info with full option list, raw requests & responses etc.
149+
-n <ilist> - only migrate issues with comma separated numbers given by the list. Can include a range.
150+
-h, --help - show this help message and exit
151+
-v, --version - show version and exit
152+
153+
Examples:
154+
155+
./gh-missue.rb -r
156+
./gh-missue.rb -l open E3V3A/MMM-VOX
157+
./gh-missue.rb -t closed "E3V3A/TESTO" "USERNAME/REPO"
158+
./gh-missue.rb -n 1,4-5 "E3V3A/TESTO" "USERNAME/REPO"
159+
160+
Dependencies:
161+
./gh-missue.rb depends on the following gem packages: octokit, docopt.
162+
```
87163

88164
---
89165

@@ -99,7 +175,7 @@ I strongly recommend to use the first option, unless you plan to use Ruby a lot
99175
**Installing the native Ruby package:**
100176

101177
```bash
102-
sudo apt-get install ruby2.3
178+
sudo apt-get install ruby3.1
103179
sudo gem install bundler
104180
```
105181

@@ -154,12 +230,12 @@ You can check your current rate limit with: `./gh-missue.rb -r`
154230

155231

156232
* If you are only migrating *labels* (with the `-c` option), make sure the labels doesn't already exist
157-
in the target repo, or you will have a failure. I.e. there are some default lables, that you need
233+
in the target repo, or you will have a failure. I.e. there are some default labels, that you need
158234
to remove from your target repo!
159235

160236

161237
:information_source: For other bugs, issues, details and updates, please refer to the
162-
[issue tracker](https://github.com/eouia/MMM-Assistant/issues).
238+
[issue tracker](https://github.com/E3V3A/gh-missue/issues).
163239

164240

165241
#### Contribution
@@ -169,13 +245,6 @@ Feel free to fork, break, fix and contribute. Enjoy!
169245

170246
---
171247

172-
**Recommended similar tools**
173-
174-
* [github-issues-import](https://github.com/muff1nman/github-issues-import) and [mod](https://github.com/ericnewton76/github-issues-import) (Python)
175-
* [github-issue-mover](https://github.com/google/github-issue-mover) (Dart)
176-
* [go-github-issues-mover](https://github.com/UnAfraid/go-github-issues-mover) (Go)
177-
* [offline-issues](https://github.com/jlord/offline-issues) (JS) -- To read issues offline
178-
179248
**References:**
180249

181250
* [Ruby in 20 minutes](https://www.ruby-lang.org/en/documentation/quickstart/)
@@ -185,31 +254,24 @@ Feel free to fork, break, fix and contribute. Enjoy!
185254

186255
**Essential GitHub API documents:**
187256

188-
[Labels-used-for-issues](https://github.com/dotnet/roslyn/wiki/Labels-used-for-issues)
189-
https://developer.github.com/v3/issues/
190-
https://developer.github.com/v3/issues/labels/
191-
https://developer.github.com/v3/issues/labels/#get-a-single-label
192-
https://developer.github.com/v3/issues/#list-issues-for-a-repository
193257

194-
https://developer.github.com/v3/#abuse-rate-limits
195-
https://developer.github.com/v3/#rate-limiting
196-
https://developer.github.com/v3/rate_limit/
197-
https://developer.github.com/v4/guides/resource-limitations/
198-
https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-rate-limits
199-
https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications
258+
[1] https://developer.github.com/v3/issues/
259+
[2] https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting
260+
[3] https://docs.github.com/en/rest/overview/media-types#request-specific-version
261+
[4] Some ideas for [Labels-used-for-issues](https://github.com/dotnet/roslyn/wiki/Labels-used-for-issues)
200262

201263

202264
---
203265

204266
#### Credits
205267

206268
Most grateful thanks to:
207-
* [---](https://github.com/---/) - for clarifying and fixing XXXX
269+
* [Xanewok](https://github.com/Xanewok/) - for adding original author & issue link functionality
208270

209271
---
210272

211273
#### License
212274

213-
[![GitHub license](https://img.shields.io/github/license/E3V3A/gh-missue.svg)](https://github.com/E3V3A/gh-missue/blob/master/LICENSE)
275+
[![GitHub license](https://img.shields.io/github/license/E3V3A/gh-missue.svg)](https://github.com/E3V3A/gh-missue/blob/master/LICENSE)
214276
A license to :sparkling_heart:!
215277

docs/ISSUE_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
For new bugs and issues, please **make sure** to:
1313
- [ ] get info about your system configuration, if relevant. Post the output of:
14-
`node -v && npm -v; uname -a; sudo lsb_release -a;`
14+
`ruby -v && gem list; uname -a; sudo lsb_release -a;`
1515
- [ ] include detailed information on what you did before the *error/issue* occurred.
1616
- [ ] use code mark-down using 3 back-ticks (```), to enclose multi-line code/input/output.
1717
- [ ] include a **screenshot** for issues concerning *layouts, formatting* or other UI stuff.

docs/screen1.png

19.8 KB
Loading

docs/screen2.png

26.5 KB
Loading

0 commit comments

Comments
 (0)