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
Copy file name to clipboardExpand all lines: README.md
+53Lines changed: 53 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -256,3 +256,56 @@ View repository READMEs.
256
256
8. gh aliasset
257
257
Create a shortcut for a gh command.
258
258
```
259
+
## GitHub CLI commands:
260
+
```sh
261
+
List Issues With GitHub CLI
262
+
1. gh issue list
263
+
list out the open GitHub Issues for our project
264
+
265
+
2. gh issue list --state "all"
266
+
gh issue list -s "all"
267
+
If we want to list out ALL of the issues we could use the “state” flag
268
+
269
+
3. gh issue list --assignee "n8ebel"
270
+
Now, maybe we’ve realized that is too many issues to sort through, so we decide we only want to list out your currently assigned issues.
271
+
272
+
4. gh issue status
273
+
Next, we want to check in on the status of a couple of the issues we created yesterday. Maybe we don’t remember their exact numbers, but since we created them, we can use the status command to list them at the terminal
274
+
275
+
5. gh issue list --state "closed"
276
+
gh issue list -s "closed"
277
+
After checking in on these issues, we still can’t find the issue we’re looking for, so we might want to check whether it was closed or not.
278
+
279
+
6. gh issue list --label "bug"
280
+
gh issue list -l "bug"
281
+
To list out all of our open bugs, we could filter by the “bug” label defined in our GitHub repo
282
+
283
+
7. gh issue view "15"
284
+
Once we’ve found an issue we want to fix, we might want to assign that issue to ourselves. Currently, we can’t do that directly from the command line, but we can quickly open the issue from the command line using the “view” command.
285
+
286
+
8. gh issue create
287
+
We can use the gh issue create command to create a new GitHub Issue directly from the command line.
If you’d like to simplify things a bit, you can specify the issue with the command using additional flags
291
+
292
+
10. gh pr list
293
+
list the open pull requests for our project.
294
+
295
+
11. gh pr list --state "all"
296
+
gh pr list -s "all"
297
+
If we want to list out ALL of the pull requests, both open and closed, we could use the “state” flag
298
+
299
+
12. gh pr status
300
+
Next, we want to check in on the status of a couple of the PRs we created yesterday. Maybe we don’t remember their exact numbers, but since we created them, we can use the status command to list them at the terminal
301
+
302
+
13. gh pr list --state "closed"
303
+
gh pr list -s "closed"
304
+
After checking in on these PRs, we still can’t find the pull request we’re looking for, so we might want to check whether it was closed or not.
305
+
306
+
14. gh pr view "14"
307
+
Once we’ve found a PR we want to review, we might want to assign that PR to ourself. Currently, we can’t do that directly from the command line, but we can quickly open the PR from the command line using the view command.
0 commit comments