Skip to content

Commit 257e5c9

Browse files
authored
Merge pull request #131 from nextcloud/feat/milestonemover
2 parents e64945e + 4d64484 commit 257e5c9

5 files changed

Lines changed: 1938 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
vendor
22
credentials.json
33
.DS_Store
4+
milestone_move_progress.json

milestonemover/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# GitHub Milestone Issue Mover
2+
3+
Bulk move GitHub issues/PRs between milestones across multiple repositories.
4+
5+
## Features
6+
7+
- 🔄 Bulk migration across multiple repos
8+
- 🛡️ Automatic rate limit handling
9+
- 📋 Resume interrupted runs
10+
- 🧪 Dry run mode
11+
- 💾 Progress tracking
12+
13+
## Usage
14+
15+
```bash
16+
# Basic usage
17+
php run.php "Source Milestone" "Destination Milestone"
18+
19+
# Options
20+
--dry-run Preview changes without applying
21+
--resume Continue from previous interrupted run
22+
--help Show usage info
23+
```
24+
25+
## Examples
26+
27+
```bash
28+
# Move issues
29+
php run.php "Nextcloud 25" "Nextcloud 26"
30+
31+
# Preview first
32+
php run.php "Nextcloud 25.0.4" "Nextcloud 25.0.5" --dry-run
33+
34+
# Resume interrupted run
35+
php run.php "Nextcloud 25.0.4" "Nextcloud 25.0.5" --resume
36+
```
37+
38+
## Requirements
39+
40+
- GitHub token with `repo` and `issues` permissions (set in `credentials.json`)
41+
- Both milestones must already exist in target repositories
42+
43+
## How it Works
44+
45+
1. Finds source/destination milestones in each repo
46+
2. Gets all issues assigned to source milestone
47+
3. Updates each issue to destination milestone
48+
4. Saves progress every 5 issues for resumption
49+
5. Handles rate limits automatically (5000 requests/hour)

milestonemover/composer.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"require": {
3+
"knplabs/github-api": "^3.9.0",
4+
"guzzlehttp/guzzle": "^7.5.0",
5+
"http-interop/http-factory-guzzle": "^1.2.0",
6+
"tedivm/stash": "^0.16.0"
7+
},
8+
"config": {
9+
"allow-plugins": {
10+
"php-http/discovery": true
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)