nitor 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/LICENSE +15 -0
- package/README.md +2 -2
- package/package.json +13 -4
- package/.commitlintrc.json +0 -10
- package/.editorconfig +0 -16
- package/.eslintrc.js +0 -29
- package/.gitattributes +0 -2
- package/.prettierrc +0 -5
- package/.releaserc.json +0 -34
- package/docs/AUTOCOMPLETE.md +0 -136
- package/docs/BACKUP.md +0 -343
- package/docs/BUILD.md +0 -120
- package/docs/BUILD_DEPLOY.md +0 -320
- package/docs/CLEANUP.md +0 -285
- package/docs/CREATE_BRANCH.md +0 -173
- package/docs/DEPLOY.md +0 -130
- package/docs/MERGE.md +0 -253
- package/docs/MR_STATUS.md +0 -74
- package/docs/README.md +0 -281
- package/docs/REFACTOR.md +0 -375
- package/docs/REVIEW.md +0 -185
- package/docs/TIME_ENTRY.md +0 -422
package/docs/CREATE_BRANCH.md
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
# Create Branch Command Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
The `create-branch` command creates a new Git branch following a standardized naming convention based on task number, type, and description.
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
### Basic Syntax
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
nitor create-branch -task <task number> -type <feat|fix> -description <description> -project <project short name>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Short Form
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
nitor create-branch -t <task number> -ty <feat|fix> -d <description> -p <project short name>
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Options
|
|
22
|
-
|
|
23
|
-
| Option | Short | Description | Values |
|
|
24
|
-
| --------------- | ------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
25
|
-
| `--task` | `-t` | Task number | Any task/ticket number |
|
|
26
|
-
| `--type` | `-ty` | Branch type | `feat`, `fix` |
|
|
27
|
-
| `--description` | `-d` | Branch description | Any descriptive text |
|
|
28
|
-
| `--project` | `-p` | Project short name | `portal`, `gateway`, `phr`, `configService`, `healthRecords`, `centralAuth`, `mpi`, `phrAdminBackend`, `phrAdminClient`, `terminologyService` |
|
|
29
|
-
| `--help` | `-help` | Show help | - |
|
|
30
|
-
|
|
31
|
-
## Examples
|
|
32
|
-
|
|
33
|
-
### Create Feature Branch
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
nitor create-branch -t 1234 -ty feat -d "add-user-authentication" -p portal
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
This creates a branch like: `feat/1234-add-user-authentication`
|
|
40
|
-
|
|
41
|
-
### Create Bug Fix Branch
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
nitor create-branch -task 5678 -type fix -description "fix-login-issue" -project gateway
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
This creates a branch like: `fix/5678-fix-login-issue`
|
|
48
|
-
|
|
49
|
-
### Create Branch Without Project
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
nitor create-branch -t 9012 -ty feat -d "update-api-endpoints"
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Branch Types
|
|
56
|
-
|
|
57
|
-
### feat (Feature)
|
|
58
|
-
|
|
59
|
-
Use for new features or enhancements:
|
|
60
|
-
|
|
61
|
-
- New functionality
|
|
62
|
-
- Feature additions
|
|
63
|
-
- Enhancements to existing features
|
|
64
|
-
|
|
65
|
-
### fix (Bug Fix)
|
|
66
|
-
|
|
67
|
-
Use for bug fixes:
|
|
68
|
-
|
|
69
|
-
- Bug corrections
|
|
70
|
-
- Issue resolutions
|
|
71
|
-
- Hotfixes
|
|
72
|
-
|
|
73
|
-
## Branch Naming Convention
|
|
74
|
-
|
|
75
|
-
Branches are created following this pattern:
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
<type>/<task-number>-<description>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Examples:**
|
|
82
|
-
|
|
83
|
-
- `feat/1234-user-profile-page`
|
|
84
|
-
- `fix/5678-login-validation-error`
|
|
85
|
-
- `feat/9012-api-integration`
|
|
86
|
-
|
|
87
|
-
## Supported Projects
|
|
88
|
-
|
|
89
|
-
- **portal** - Portal application
|
|
90
|
-
- **gateway** - Gateway service
|
|
91
|
-
- **phr** - Personal Health Records
|
|
92
|
-
- **configService** - Configuration service
|
|
93
|
-
- **healthRecords** - Health records service
|
|
94
|
-
- **centralAuth** - Central authentication service
|
|
95
|
-
- **mpi** - Master Patient Index
|
|
96
|
-
- **phrAdminBackend** - PHR admin backend
|
|
97
|
-
- **phrAdminClient** - PHR admin client
|
|
98
|
-
- **terminologyService** - Terminology service
|
|
99
|
-
|
|
100
|
-
## Branch Creation Process
|
|
101
|
-
|
|
102
|
-
The command will:
|
|
103
|
-
|
|
104
|
-
1. Validate task number, type, and description
|
|
105
|
-
2. Format the branch name according to convention
|
|
106
|
-
3. Create the new branch from current branch
|
|
107
|
-
4. Checkout to the new branch
|
|
108
|
-
|
|
109
|
-
## Best Practices
|
|
110
|
-
|
|
111
|
-
### Description Guidelines
|
|
112
|
-
|
|
113
|
-
- Use lowercase letters
|
|
114
|
-
- Use hyphens to separate words
|
|
115
|
-
- Be descriptive but concise
|
|
116
|
-
- Avoid special characters
|
|
117
|
-
|
|
118
|
-
**Good:**
|
|
119
|
-
|
|
120
|
-
- `add-user-authentication`
|
|
121
|
-
- `fix-payment-gateway-error`
|
|
122
|
-
- `update-dashboard-layout`
|
|
123
|
-
|
|
124
|
-
**Avoid:**
|
|
125
|
-
|
|
126
|
-
- `Add User Authentication` (uppercase)
|
|
127
|
-
- `fix_payment_error` (underscores)
|
|
128
|
-
- `update` (too vague)
|
|
129
|
-
|
|
130
|
-
### Task Numbers
|
|
131
|
-
|
|
132
|
-
- Use your project management system's task/ticket number
|
|
133
|
-
- Ensure the number is accurate for tracking
|
|
134
|
-
- Include the full ticket number
|
|
135
|
-
|
|
136
|
-
## Troubleshooting
|
|
137
|
-
|
|
138
|
-
### Branch Already Exists
|
|
139
|
-
|
|
140
|
-
If the branch name already exists:
|
|
141
|
-
|
|
142
|
-
1. Check if you're working on the same task
|
|
143
|
-
2. Use a different description
|
|
144
|
-
3. Delete the old branch if it's no longer needed
|
|
145
|
-
|
|
146
|
-
### Invalid Branch Type
|
|
147
|
-
|
|
148
|
-
Ensure you're using one of the supported types:
|
|
149
|
-
|
|
150
|
-
- `feat` for features
|
|
151
|
-
- `fix` for bug fixes
|
|
152
|
-
|
|
153
|
-
### Git Errors
|
|
154
|
-
|
|
155
|
-
If you encounter Git errors:
|
|
156
|
-
|
|
157
|
-
1. Ensure you're in a Git repository
|
|
158
|
-
2. Check that you have uncommitted changes
|
|
159
|
-
3. Verify Git is properly configured
|
|
160
|
-
|
|
161
|
-
## Getting Help
|
|
162
|
-
|
|
163
|
-
To see all available options:
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
nitor create-branch -help
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## Related Commands
|
|
170
|
-
|
|
171
|
-
- `nitor merge` - Merge branches
|
|
172
|
-
- `nitor cleanup` - Clean up local branches
|
|
173
|
-
- `nitor review` - Review merge requests
|
package/docs/DEPLOY.md
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
# Deploy Command Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
The `deploy` command deploys previously built components to specified instances. It works with projects that have already been successfully built.
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
### Basic Syntax
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
nitor deploy -project <project name> -components <component name> -instance <instance name>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Short Form
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
nitor deploy -p <project name> -c <component name> -i <instance name>
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Options
|
|
22
|
-
|
|
23
|
-
| Option | Short | Description | Values |
|
|
24
|
-
| -------------- | ------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
25
|
-
| `--project` | `-p` | Project name | `portal`, `gateway`, `phr`, `configService`, `healthRecords`, `centralAuth`, `mpi`, `phrAdminBackend`, `phrAdminClient`, `terminologyService` |
|
|
26
|
-
| `--components` | `-c` | Component name | `client`, `administration`, `provider`, `rest-api` |
|
|
27
|
-
| `--instance` | `-i` | Instance name | `dev`, `qa`, `pilot` |
|
|
28
|
-
| `--help` | `-help` | Show help | - |
|
|
29
|
-
|
|
30
|
-
## Examples
|
|
31
|
-
|
|
32
|
-
### Deploy Portal Client to Dev
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
nitor deploy -p portal -c client -i dev
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Deploy Gateway Backend to QA
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
nitor deploy -project gateway -components rest-api -instance qa
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Deploy Multiple Components
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
nitor deploy -p phr -c "client administration" -i pilot
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Supported Projects
|
|
51
|
-
|
|
52
|
-
- **portal** - Portal application
|
|
53
|
-
- **gateway** - Gateway service
|
|
54
|
-
- **phr** - Personal Health Records
|
|
55
|
-
- **configService** - Configuration service
|
|
56
|
-
- **healthRecords** - Health records service
|
|
57
|
-
- **centralAuth** - Central authentication service
|
|
58
|
-
- **mpi** - Master Patient Index
|
|
59
|
-
- **phrAdminBackend** - PHR admin backend
|
|
60
|
-
- **phrAdminClient** - PHR admin client
|
|
61
|
-
- **terminologyService** - Terminology service
|
|
62
|
-
|
|
63
|
-
## Supported Components
|
|
64
|
-
|
|
65
|
-
- **client** - Frontend client application
|
|
66
|
-
- **administration** - Administration panel
|
|
67
|
-
- **provider** - Provider interface
|
|
68
|
-
- **rest-api** - REST API backend
|
|
69
|
-
|
|
70
|
-
## Supported Instances
|
|
71
|
-
|
|
72
|
-
- **dev** - Development environment
|
|
73
|
-
- **qa** - Quality assurance environment
|
|
74
|
-
- **pilot** - Pilot/staging environment
|
|
75
|
-
|
|
76
|
-
## Deployment Process
|
|
77
|
-
|
|
78
|
-
The deploy command will:
|
|
79
|
-
|
|
80
|
-
1. Validate project, component, and instance parameters
|
|
81
|
-
2. Check if components are built and ready
|
|
82
|
-
3. Deploy components to the specified instance
|
|
83
|
-
4. Verify deployment status
|
|
84
|
-
5. Report deployment results
|
|
85
|
-
|
|
86
|
-
## Prerequisites
|
|
87
|
-
|
|
88
|
-
Before deploying:
|
|
89
|
-
|
|
90
|
-
- Components must be successfully built
|
|
91
|
-
- You must have proper deployment credentials
|
|
92
|
-
- Target instance must be accessible
|
|
93
|
-
|
|
94
|
-
## Troubleshooting
|
|
95
|
-
|
|
96
|
-
### Deployment Fails
|
|
97
|
-
|
|
98
|
-
1. **Check if build exists:**
|
|
99
|
-
Ensure components are built before deploying
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
nitor build -p <project> -c <component> -i <instance>
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
2. **Verify credentials:**
|
|
106
|
-
Check that you have proper deployment permissions
|
|
107
|
-
|
|
108
|
-
3. **Check instance status:**
|
|
109
|
-
Ensure the target instance is running and accessible
|
|
110
|
-
|
|
111
|
-
### Connection Issues
|
|
112
|
-
|
|
113
|
-
If deployment fails due to connection:
|
|
114
|
-
|
|
115
|
-
- Verify network connectivity
|
|
116
|
-
- Check VPN connection if required
|
|
117
|
-
- Confirm instance URL is correct
|
|
118
|
-
|
|
119
|
-
## Getting Help
|
|
120
|
-
|
|
121
|
-
To see all available options:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
nitor deploy -help
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Related Commands
|
|
128
|
-
|
|
129
|
-
- `nitor build` - Build components before deployment
|
|
130
|
-
- `nitor build-deploy` - Build and deploy in one command
|
package/docs/MERGE.md
DELETED
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
# Merge Command Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
The `merge` command safely merges a source branch into a target branch with automatic pull and push operations.
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
### Basic Syntax
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
nitor merge -source <source branch> -target <target branch>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Short Form
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
nitor merge -s <source branch> -ta <target branch>
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Options
|
|
22
|
-
|
|
23
|
-
| Option | Short | Description | Required |
|
|
24
|
-
| ---------- | ------- | ------------------ | -------- |
|
|
25
|
-
| `--source` | `-s` | Source branch name | Yes |
|
|
26
|
-
| `--target` | `-ta` | Target branch name | Yes |
|
|
27
|
-
| `--help` | `-help` | Show help | - |
|
|
28
|
-
|
|
29
|
-
## Examples
|
|
30
|
-
|
|
31
|
-
### Merge Feature to Development
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
nitor merge -s feat/123-new-feature -ta development
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Merge Development to Master
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
nitor merge -source development -target master
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Merge Fix to Release Branch
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
nitor merge -s fix/456-bug-fix -ta release/v1.2.0
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Merge Process
|
|
50
|
-
|
|
51
|
-
The merge command performs these steps automatically:
|
|
52
|
-
|
|
53
|
-
1. **Pull Latest Changes**
|
|
54
|
-
|
|
55
|
-
- Fetches latest updates from remote
|
|
56
|
-
|
|
57
|
-
2. **Checkout Source Branch**
|
|
58
|
-
|
|
59
|
-
- Switches to source branch
|
|
60
|
-
- Pulls latest changes
|
|
61
|
-
|
|
62
|
-
3. **Checkout Target Branch**
|
|
63
|
-
|
|
64
|
-
- Switches to target branch
|
|
65
|
-
- Pulls latest changes
|
|
66
|
-
|
|
67
|
-
4. **Merge Source into Target**
|
|
68
|
-
|
|
69
|
-
- Merges source branch into target
|
|
70
|
-
- Handles merge conflicts if any
|
|
71
|
-
|
|
72
|
-
5. **Push Changes**
|
|
73
|
-
- Pushes merged changes to remote
|
|
74
|
-
|
|
75
|
-
## Branch Naming
|
|
76
|
-
|
|
77
|
-
You can use any valid Git branch names:
|
|
78
|
-
|
|
79
|
-
### Common Patterns
|
|
80
|
-
|
|
81
|
-
- `master` or `main` - Main branch
|
|
82
|
-
- `development` or `dev` - Development branch
|
|
83
|
-
- `feat/<description>` - Feature branches
|
|
84
|
-
- `fix/<description>` - Bug fix branches
|
|
85
|
-
- `release/<version>` - Release branches
|
|
86
|
-
- `hotfix/<description>` - Hotfix branches
|
|
87
|
-
|
|
88
|
-
## Handling Merge Conflicts
|
|
89
|
-
|
|
90
|
-
If conflicts occur during merge:
|
|
91
|
-
|
|
92
|
-
1. The command will notify you of conflicts
|
|
93
|
-
2. Manually resolve conflicts in affected files
|
|
94
|
-
3. Stage resolved files:
|
|
95
|
-
```bash
|
|
96
|
-
git add <resolved-files>
|
|
97
|
-
```
|
|
98
|
-
4. Complete the merge:
|
|
99
|
-
```bash
|
|
100
|
-
git commit
|
|
101
|
-
```
|
|
102
|
-
5. Push changes:
|
|
103
|
-
```bash
|
|
104
|
-
git push
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
## Best Practices
|
|
108
|
-
|
|
109
|
-
### Before Merging
|
|
110
|
-
|
|
111
|
-
1. **Ensure Clean Working Directory**
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
git status
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Commit or stash any uncommitted changes
|
|
118
|
-
|
|
119
|
-
2. **Test Source Branch**
|
|
120
|
-
|
|
121
|
-
- Run tests on source branch
|
|
122
|
-
- Verify functionality works
|
|
123
|
-
|
|
124
|
-
3. **Review Changes**
|
|
125
|
-
```bash
|
|
126
|
-
git log target..source
|
|
127
|
-
```
|
|
128
|
-
Review commits being merged
|
|
129
|
-
|
|
130
|
-
### After Merging
|
|
131
|
-
|
|
132
|
-
1. **Verify Merge**
|
|
133
|
-
|
|
134
|
-
- Check that all changes are included
|
|
135
|
-
- Run tests on target branch
|
|
136
|
-
|
|
137
|
-
2. **Notify Team**
|
|
138
|
-
|
|
139
|
-
- Inform team members of the merge
|
|
140
|
-
- Update relevant documentation
|
|
141
|
-
|
|
142
|
-
3. **Delete Feature Branch** (if applicable)
|
|
143
|
-
```bash
|
|
144
|
-
git branch -d feat/123-feature-name
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## Common Merge Scenarios
|
|
148
|
-
|
|
149
|
-
### Merge Feature to Development
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
# After completing feature work
|
|
153
|
-
nitor merge -s feat/123-user-auth -ta development
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
### Merge Development to Master
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
# For production release
|
|
160
|
-
nitor merge -s development -ta master
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### Merge Hotfix to Multiple Branches
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
# Merge to master
|
|
167
|
-
nitor merge -s hotfix/critical-bug -ta master
|
|
168
|
-
|
|
169
|
-
# Then merge to development
|
|
170
|
-
nitor merge -s hotfix/critical-bug -ta development
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## Troubleshooting
|
|
174
|
-
|
|
175
|
-
### Merge Conflicts
|
|
176
|
-
|
|
177
|
-
If you encounter conflicts:
|
|
178
|
-
|
|
179
|
-
1. **Identify conflicted files:**
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
git status
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
2. **Open and resolve conflicts:**
|
|
186
|
-
|
|
187
|
-
- Look for conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`)
|
|
188
|
-
- Choose the correct code
|
|
189
|
-
- Remove conflict markers
|
|
190
|
-
|
|
191
|
-
3. **Complete merge:**
|
|
192
|
-
```bash
|
|
193
|
-
git add <resolved-files>
|
|
194
|
-
git commit
|
|
195
|
-
git push
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### Failed to Push
|
|
199
|
-
|
|
200
|
-
If push fails:
|
|
201
|
-
|
|
202
|
-
1. **Pull latest changes:**
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
git pull
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
2. **Resolve any conflicts**
|
|
209
|
-
|
|
210
|
-
3. **Push again:**
|
|
211
|
-
```bash
|
|
212
|
-
git push
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### Branch Not Found
|
|
216
|
-
|
|
217
|
-
If source or target branch doesn't exist:
|
|
218
|
-
|
|
219
|
-
1. **List available branches:**
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
git branch -a
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
2. **Verify branch names are correct**
|
|
226
|
-
|
|
227
|
-
3. **Fetch remote branches:**
|
|
228
|
-
```bash
|
|
229
|
-
git fetch
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
## Safety Features
|
|
233
|
-
|
|
234
|
-
The merge command includes safety checks:
|
|
235
|
-
|
|
236
|
-
- Pulls latest changes before merging
|
|
237
|
-
- Ensures branches are up-to-date
|
|
238
|
-
- Validates branch existence
|
|
239
|
-
- Handles merge conflicts gracefully
|
|
240
|
-
|
|
241
|
-
## Getting Help
|
|
242
|
-
|
|
243
|
-
To see all available options:
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
nitor merge -help
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
## Related Commands
|
|
250
|
-
|
|
251
|
-
- `nitor create-branch` - Create new branches
|
|
252
|
-
- `nitor cleanup` - Clean up merged branches
|
|
253
|
-
- `nitor review` - Review merge requests
|
package/docs/MR_STATUS.md
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# mr-status
|
|
2
|
-
|
|
3
|
-
List GitLab repositories you are a member of, pick one, and view its merge
|
|
4
|
-
requests rendered as a branch tree. Useful for quickly seeing the shape of a
|
|
5
|
-
stacked/chained set of MRs, what targets what, and who owns each one.
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
nitor mr-status [-state <opened|merged|closed|all>] [-search <text>]
|
|
11
|
-
nitor mr-status [-st <state>] [-q <text>]
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Running `nitor mr-status` with no arguments will:
|
|
15
|
-
|
|
16
|
-
1. Fetch the repositories you are a member of (ordered by last activity).
|
|
17
|
-
2. Prompt you to pick one by number.
|
|
18
|
-
3. Prompt you to pick an MR state (defaults to `opened`).
|
|
19
|
-
4. Print the selected repository's merge requests grouped by target branch as
|
|
20
|
-
a tree, showing source → target, state, author, last update time and URL.
|
|
21
|
-
|
|
22
|
-
## Options
|
|
23
|
-
|
|
24
|
-
- `-st`, `-state <state>` — MR state filter. One of `opened` (default),
|
|
25
|
-
`merged`, `closed`, `all`.
|
|
26
|
-
- `-q`, `-search <text>` — Pre-filter the repository list by name before the
|
|
27
|
-
interactive picker is shown.
|
|
28
|
-
|
|
29
|
-
## Examples
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
# Fully interactive
|
|
33
|
-
nitor mr-status
|
|
34
|
-
|
|
35
|
-
# Jump straight to opened MRs after picking a repo
|
|
36
|
-
nitor mr-status -state opened
|
|
37
|
-
|
|
38
|
-
# Narrow the repo picker to repos whose names contain "portal"
|
|
39
|
-
nitor mr-status -search portal
|
|
40
|
-
|
|
41
|
-
# Short aliases
|
|
42
|
-
nitor mr-status -st merged -q gateway
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## How the tree is built
|
|
46
|
-
|
|
47
|
-
- MRs are grouped by their `target_branch`.
|
|
48
|
-
- A target branch that is **not** any MR's source branch is treated as a root
|
|
49
|
-
(e.g. `master`, `development`).
|
|
50
|
-
- For each MR, if its `source_branch` is itself a target of another MR, that
|
|
51
|
-
MR is nested underneath as a child — producing a readable stack of MRs.
|
|
52
|
-
- Cycles (rare, but possible with odd branch setups) are detected and marked
|
|
53
|
-
with a `(cycle)` label instead of recursing forever.
|
|
54
|
-
|
|
55
|
-
## Requirements
|
|
56
|
-
|
|
57
|
-
The command uses the GitLab REST API and requires the following env vars in
|
|
58
|
-
your `.env.nu`:
|
|
59
|
-
|
|
60
|
-
- `GITLAB_URI` — e.g. `https://gitlab.com/`
|
|
61
|
-
- `GITLAB_TOKEN` — personal access token with `read_api` scope
|
|
62
|
-
|
|
63
|
-
If either is missing, the command exits with a clear message.
|
|
64
|
-
|
|
65
|
-
## Output legend
|
|
66
|
-
|
|
67
|
-
- `⎇ <branch>` — a target branch heading with the number of MRs targeting it
|
|
68
|
-
- `!<iid> <title>` — the merge request, colored by state:
|
|
69
|
-
- green: `opened`
|
|
70
|
-
- blue: `merged`
|
|
71
|
-
- red: `closed`
|
|
72
|
-
- `[draft]` — shown when the MR is a draft / WIP
|
|
73
|
-
- Second line: `source → target [state] author updated_at`
|
|
74
|
-
- Third line: the MR web URL (clickable in most modern terminals)
|