Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Add more EXAMPLES for mr subcommands #538

Merged
merged 14 commits into from
Jan 8, 2021
Merged

Add more EXAMPLES for mr subcommands #538

merged 14 commits into from
Jan 8, 2021

Conversation

maxice8
Copy link
Collaborator

@maxice8 maxice8 commented Jan 8, 2021

Description

Add EXAMPLES section for almost all subcommands

How Has This Been Tested?

bin/glab <subcommand> --help

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)

@codecov
Copy link

codecov bot commented Jan 8, 2021

Codecov Report

Merging #538 (53d9131) into trunk (631e7d8) will increase coverage by 0.21%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            trunk     #538      +/-   ##
==========================================
+ Coverage   60.66%   60.88%   +0.21%     
==========================================
  Files          86       86              
  Lines        5880     5913      +33     
==========================================
+ Hits         3567     3600      +33     
  Misses       1979     1979              
  Partials      334      334              
Impacted Files Coverage Δ
commands/mr/create/mr_create.go 33.42% <100.00%> (+1.14%) ⬆️
commands/mr/delete/mr_delete.go 83.33% <100.00%> (+3.33%) ⬆️
commands/mr/diff/diff.go 84.21% <100.00%> (+1.35%) ⬆️
commands/mr/list/mr_list.go 73.62% <100.00%> (+2.19%) ⬆️
commands/mr/subscribe/mr_subscribe.go 80.64% <100.00%> (+3.72%) ⬆️
commands/mr/unsubscribe/mr_unsubscribe.go 80.64% <100.00%> (+3.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 631e7d8...53d9131. Read the comment docs.

Comment on lines 22 to 27
Example: heredoc.Doc(`
$ glab mr close 1
$ glab mr close branch
$ glab mr close username:branch
$ glab mr close branch -R another/repo
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also without supplying any argument, it finds the mr for the current branch

Suggested change
Example: heredoc.Doc(`
$ glab mr close 1
$ glab mr close branch
$ glab mr close username:branch
$ glab mr close branch -R another/repo
Example: heredoc.Doc(`
$ glab mr close # Closes mr for current branch
$ glab mr close 1
$ glab mr close branch
$ glab mr close username:branch
$ glab mr close branch -R another/repo

Comment on lines 23 to 25
$ glab delete 123
$ glab del 123
$ glab delete branch
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You missed the mr command here:

Suggested change
$ glab delete 123
$ glab del 123
$ glab delete branch
$ glab mr delete
#=> deletes mr for current branch
$ glab mr delete 123
$ glab mr del 123
$ glab mr delete branch

Comment on lines +25 to +26
$ glab mr issues 46
$ glab mr issues branch
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ glab mr issues 46
$ glab mr issues branch
$ glab mr issues 46
$ glab mr issues branch
$ glab mr issues

@profclems
Copy link
Owner

@maxice8 For all the mr subcommands, except create and list, if the user does not specify a branch or ID, glab finds the merge request for the current branch

@maxice8
Copy link
Collaborator Author

maxice8 commented Jan 8, 2021

Updated, thanks for noticing the mistakes.

Copy link
Owner

@profclems profclems left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this

@maxice8 maxice8 merged commit 54324ab into profclems:trunk Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants