You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [:material-tooltip-check: Recipes > Working with non-GitHub remotes](../recipes.md#working-with-non-github-remotes)
24
+
- [:material-tooltip-check: Recipes > Working with unsupported remotes](../recipes.md#working-with-unsupported-remotes)
19
25
- [:material-frequently-asked-questions: FAQ > Will git-spice add support for other Git hosting services](../faq.md#will-git-spice-add-support-for-other-git-hosting-services)
20
26
21
-
## Submitting pull requests
27
+
## Submitting change requests
28
+
29
+
!!! info
30
+
31
+
git-spice uses the term *Change Request* to refer to submitted branches.
32
+
These corespond to Pull Requests on GitHub,
33
+
and to Merge Requests on GitLab.
22
34
23
35
When your local changes are ready,
24
36
use the following commands to submit your changes upstream:
@@ -33,10 +45,10 @@ use the following commands to submit your changes upstream:
33
45
submits all branches in the stack
34
46
35
47
Branch submission is an idempotent operation:
36
-
pull requests will be created for branches that don't already have them,
48
+
change requests will be created for branches that don't already have them,
37
49
and updated for branches that do.
38
50
39
-
For new pull requests, these commands will prompt you for PR information.
51
+
For new change requests, these commands will prompt you for CR information.
40
52
For example:
41
53
42
54
```freeze language="ansi"
@@ -52,11 +64,17 @@ For example:
52
64
53
65
### Navigation comments
54
66
55
-
Pull Requests created by git-spice will include a navigation comment
67
+
Change Requests created by git-spice will include a navigation comment
56
68
at the top with a visual representation of the stack,
57
69
and the position of the current branch in it.
58
70
59
-

71
+
=== "<!-- gs:github -->"
72
+
73
+

74
+
75
+
=== "<!-- gs:gitlab -->"
76
+
77
+

60
78
61
79
This behavior may be changed with the $$spice.submit.navigationComment$$
62
80
configuration key.
@@ -86,7 +104,7 @@ you may also specify title and body directly.
86
104
87
105
!!! info "Setting draft status non-interactively"
88
106
89
-
Pull requests may be marked as draft or ready for review
107
+
Change requests may be marked as draft or ready for review
90
108
non-interactively with the `--draft` and `--no-draft` flags.
91
109
92
110
By default, the submit commands will leave
@@ -123,35 +141,52 @@ This will update the trunk branch (e.g. `main`)
123
141
with the latest changes from the upstream repository,
124
142
and delete any local branches whose PRs have been merged.
125
143
126
-
## Importing pull requests
144
+
## Importing open CRs
127
145
128
-
You can import an existing PR into git-spice
146
+
You can import an existing open CR into git-spice
129
147
by checking it out locally, tracking the branch with git-spice,
130
148
and re-submitting it.
131
149
132
-
For example, if you have the GitHub CLI installed:
150
+
For example:
133
151
134
-
```freeze language="terminal"
135
-
{gray}# Check out the PR locally{reset}
136
-
{green}${reset} gh pr checkout 359
152
+
=== "<!-- gs:github -->"
137
153
138
-
{gray}# Track it with git-spice{reset}
139
-
{green}${reset} gs branch track
154
+
```freeze language="terminal"
155
+
{gray}# Check out the PR locally{reset}
156
+
{green}${reset} gh pr checkout 359
140
157
141
-
{gray}# Re-submit it{reset}
142
-
{green}${reset} gs branch submit
143
-
{green}INF{reset} comment-recovery: Found existing CR #359
144
-
{green}INF{reset} CR #359 is up-to-date: https://github.com/abhinav/git-spice/pull/359
145
-
```
158
+
{gray}# Track it with git-spice{reset}
159
+
{green}${reset} gs branch track
160
+
161
+
{gray}# Re-submit it{reset}
162
+
{green}${reset} gs branch submit
163
+
{green}INF{reset} comment-recovery: Found existing CR #359
164
+
{green}INF{reset} CR #359 is up-to-date: https://github.com/abhinav/git-spice/pull/359
165
+
```
166
+
167
+
=== "<!-- gs:gitlab -->"
168
+
169
+
```freeze language="terminal"
170
+
{gray}# Check out the MR locally{reset}
171
+
{green}${reset} glab mr checkout 8
172
+
173
+
{gray}# Track it with git-spice{reset}
174
+
{green}${reset} gs branch track
175
+
176
+
{gray}# Re-submit it{reset}
177
+
{green}${reset} gs branch submit
178
+
{green}INF{reset} reticulating-splines: Found existing CR !8
179
+
{green}INF{reset} CR !8 is up-to-date: https://gitlab.com/abg/test-repo/-/merge_requests/8
180
+
```
146
181
147
182
!!! important
148
183
149
184
For this to work, the following MUST all be true:
150
185
151
-
- The PR is pushed to a branch in the upstream repository
186
+
- The CR is pushed to a branch in the upstream repository
152
187
- The local branch name exactly matches the upstream branch name
153
188
154
-
This will work even for PRs that were not created by git-spice,
189
+
This will work even for CRs that were not created by git-spice,
155
190
or authored by someone else, as long as the above conditions are met.
0 commit comments