@knpkv/codecommit 0.1.0 → 0.1.1
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/README.md +29 -87
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
CLI and TUI for AWS CodeCommit pull requests.
|
|
4
4
|
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- AWS SSO configured (`~/.aws/config`)
|
|
8
|
+
- IAM permissions for CodeCommit (optionally granted per command):
|
|
9
|
+
- `codecommit:ListRepositories`, `codecommit:ListPullRequests`, `codecommit:GetPullRequest` — list/view
|
|
10
|
+
- `codecommit:CreatePullRequest` — create
|
|
11
|
+
- `codecommit:UpdatePullRequestTitle`, `codecommit:UpdatePullRequestDescription` — update
|
|
12
|
+
- `codecommit:GetCommentsForPullRequest` — export
|
|
13
|
+
- `codecommit:ListBranches` — branch listing
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pnpx @knpkv/codecommit
|
|
19
|
+
```
|
|
20
|
+
|
|
5
21
|
## Installation
|
|
6
22
|
|
|
7
23
|
```bash
|
|
@@ -28,8 +44,6 @@ codecommit web [--port 3000] [--hostname 127.0.0.1]
|
|
|
28
44
|
|
|
29
45
|
#### List PRs
|
|
30
46
|
|
|
31
|
-
List pull requests.
|
|
32
|
-
|
|
33
47
|
```bash
|
|
34
48
|
codecommit pr list [options]
|
|
35
49
|
```
|
|
@@ -44,25 +58,12 @@ codecommit pr list [options]
|
|
|
44
58
|
| `--author` | | Filter by author | - |
|
|
45
59
|
| `--json` | | Output as JSON | `false` |
|
|
46
60
|
|
|
47
|
-
Example:
|
|
48
|
-
|
|
49
61
|
```bash
|
|
50
|
-
# List open PRs (default)
|
|
51
62
|
codecommit pr list
|
|
52
|
-
|
|
53
|
-
# List closed PRs
|
|
54
63
|
codecommit pr list --status CLOSED
|
|
55
|
-
|
|
56
|
-
# List all PRs (open and closed)
|
|
57
64
|
codecommit pr list --all
|
|
58
|
-
|
|
59
|
-
# Filter by repo
|
|
60
65
|
codecommit pr list --repo my-repo
|
|
61
|
-
|
|
62
|
-
# Filter by author
|
|
63
|
-
codecommit pr list --author andrey
|
|
64
|
-
|
|
65
|
-
# JSON output
|
|
66
|
+
codecommit pr list --author jane
|
|
66
67
|
codecommit pr list --json
|
|
67
68
|
```
|
|
68
69
|
|
|
@@ -73,27 +74,13 @@ Found 3 open PR(s):
|
|
|
73
74
|
|
|
74
75
|
123 my-repo
|
|
75
76
|
Add feature X
|
|
76
|
-
feature/x
|
|
77
|
-
by alice
|
|
77
|
+
feature/x -> main
|
|
78
|
+
by alice approved mergeable
|
|
78
79
|
|
|
79
80
|
124 my-repo
|
|
80
81
|
Fix bug Y
|
|
81
|
-
fix/y
|
|
82
|
-
by bob
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
With `--all`:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
Found 5 all PR(s):
|
|
89
|
-
|
|
90
|
-
123 [OPEN] my-repo
|
|
91
|
-
Add feature X
|
|
92
|
-
...
|
|
93
|
-
|
|
94
|
-
120 [CLOSED] my-repo
|
|
95
|
-
Old feature
|
|
96
|
-
...
|
|
82
|
+
fix/y -> main
|
|
83
|
+
by bob conflicts
|
|
97
84
|
```
|
|
98
85
|
|
|
99
86
|
#### Create PR
|
|
@@ -110,8 +97,6 @@ codecommit pr create <repo> <title> -s <source-branch> [options]
|
|
|
110
97
|
| `--profile` | `-p` | AWS profile | `default` |
|
|
111
98
|
| `--region` | `-r` | AWS region | `us-east-1` |
|
|
112
99
|
|
|
113
|
-
Example:
|
|
114
|
-
|
|
115
100
|
```bash
|
|
116
101
|
codecommit pr create my-repo "Add feature X" -s feature/x -d main --description "Implements feature X"
|
|
117
102
|
```
|
|
@@ -130,53 +115,13 @@ codecommit pr export <pr-id> <repo> [options]
|
|
|
130
115
|
| `--profile` | `-p` | AWS profile | `default` |
|
|
131
116
|
| `--region` | `-r` | AWS region | `us-east-1` |
|
|
132
117
|
|
|
133
|
-
Example:
|
|
134
|
-
|
|
135
118
|
```bash
|
|
136
|
-
# Print to stdout
|
|
137
119
|
codecommit pr export 123 my-repo
|
|
138
|
-
|
|
139
|
-
# Save to file
|
|
140
120
|
codecommit pr export 123 my-repo -o pr-comments.md
|
|
141
121
|
```
|
|
142
122
|
|
|
143
|
-
Output format:
|
|
144
|
-
|
|
145
|
-
```markdown
|
|
146
|
-
# RPS-2585: Add CDK destroy buildspec
|
|
147
|
-
|
|
148
|
-
**Repository:** tilapia
|
|
149
|
-
**Branch:** refs/heads/feat/RPS-2585-destroy-buildspec → refs/heads/main
|
|
150
|
-
**Author:** andrey
|
|
151
|
-
**Status:** OPEN
|
|
152
|
-
**AWS Account:** core-code
|
|
153
|
-
**Link:** https://...
|
|
154
|
-
|
|
155
|
-
## Description
|
|
156
|
-
|
|
157
|
-
Adds buildspec for CDK destroy operation.
|
|
158
|
-
|
|
159
|
-
## Comments
|
|
160
|
-
|
|
161
|
-
### src/file.ts
|
|
162
|
-
|
|
163
|
-
- **alice** (2024-01-15T10:00:00Z)
|
|
164
|
-
This needs refactoring
|
|
165
|
-
- **bob** (2024-01-15T11:00:00Z)
|
|
166
|
-
Agreed, will fix
|
|
167
|
-
- **alice** (2024-01-15T12:00:00Z)
|
|
168
|
-
Thanks!
|
|
169
|
-
|
|
170
|
-
### General comments
|
|
171
|
-
|
|
172
|
-
- **charlie** (2024-01-15T09:00:00Z)
|
|
173
|
-
LGTM overall
|
|
174
|
-
```
|
|
175
|
-
|
|
176
123
|
#### Update PR
|
|
177
124
|
|
|
178
|
-
Update PR title or description.
|
|
179
|
-
|
|
180
125
|
```bash
|
|
181
126
|
codecommit pr update <pr-id> [options]
|
|
182
127
|
```
|
|
@@ -188,26 +133,23 @@ codecommit pr update <pr-id> [options]
|
|
|
188
133
|
| `--profile` | `-p` | AWS profile | `default` |
|
|
189
134
|
| `--region` | `-r` | AWS region | `us-east-1` |
|
|
190
135
|
|
|
191
|
-
Example:
|
|
192
|
-
|
|
193
136
|
```bash
|
|
194
|
-
# Update title
|
|
195
137
|
codecommit pr update 123 -t "New title"
|
|
196
|
-
|
|
197
|
-
# Update description
|
|
198
138
|
codecommit pr update 123 -d "Updated description"
|
|
199
|
-
|
|
200
|
-
# Update both
|
|
201
139
|
codecommit pr update 123 -t "New title" -d "New description"
|
|
202
140
|
```
|
|
203
141
|
|
|
204
142
|
## AWS Configuration
|
|
205
143
|
|
|
206
|
-
Uses
|
|
144
|
+
Uses AWS SSO. Configure profiles in `~/.aws/config`:
|
|
207
145
|
|
|
208
|
-
|
|
209
|
-
-
|
|
210
|
-
|
|
146
|
+
```ini
|
|
147
|
+
[profile my-profile]
|
|
148
|
+
sso_session = my-sso
|
|
149
|
+
sso_account_id = 123456789012
|
|
150
|
+
sso_role_name = MyRole
|
|
151
|
+
region = us-east-1
|
|
152
|
+
```
|
|
211
153
|
|
|
212
154
|
Specify profile with `--profile` or `AWS_PROFILE` env var.
|
|
213
155
|
|