@@ -30,9 +30,8 @@ pnpm gh-sync-labels
30
30
### Token
31
31
32
32
Before using the tool, you need to create a GitHub access token with the following required permissions:
33
- - ** repo** : To manage repositories (read and write labels).
34
- - ** repo: status ** : To get the status of repository labels.
35
- - ** repo: labels ** : To view and modify the labels of a repository.
33
+ - ** issues: read and write** : Used to get labels and create new ones
34
+ - ** pull requests: read and write** : Used to delete tokens in destination repository if you wish
36
35
37
36
## Usage
38
37
@@ -51,9 +50,10 @@ gh-sync-labels <origin> <target> [options]
51
50
52
51
### Options
53
52
54
- - ` -t, --token <string> ` : The GitHub token required to interact with GitHub's API. Ensure your token has the necessary permissions (` repo ` )
55
- If no token option is provided, * gh-sync-labels* will look for it in your environment variables under ` GITHUB_TOKEN `
56
53
- ` --verbose ` : Runs the tool in verbose mode, providing detailed logs about the operations being performed.
54
+ - ` -t, --token <string> ` : Auth token to allow gh-sync to do it's thing. Use this if the token is the same for both origin and destination repositories"
55
+ - ` --token-origin ` : Auth token of the origin repository, to allow gh-sync to do it's thing
56
+ - ` --token-destination ` : Auth token of the destination repository, to allow gh-sync to do it's thing
57
57
58
58
### Example Usage
59
59
@@ -70,21 +70,17 @@ If no token option is provided, *gh-sync-labels* will look for it in your enviro
70
70
gh-sync-labels owner/repo-a owner/repo-b
71
71
```
72
72
73
- 2 . To run the tool in verbose mode :
73
+ 3 . To synchronize labels from ` repo-a ` to ` repo-b ` but different tokens :
74
74
75
75
``` bash
76
- gh-sync-labels owner/repo-a owner/repo-b --verbose
76
+ gh-sync-labels owner/repo-a owner/repo-b --token-origin repo-a_token --token-destination repo-b_token
77
77
```
78
78
79
+ 4 . To run the tool in verbose mode:
79
80
80
- ## Disclaimer
81
-
82
- There are still improvements needed on this:
83
- - proper documentation
84
- - sync multiple repos at the same time
85
- - support for repos in org
86
- - deployment flow
87
- - add proper versioning with
81
+ ``` bash
82
+ gh-sync-labels owner/repo-a owner/repo-b --verbose
83
+ ```
88
84
89
85
## Development
90
86
0 commit comments