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

feat: fill MR desc with all commit bodies #819

Merged
merged 1 commit into from
Aug 23, 2021

Conversation

guyfedwards
Copy link
Contributor

@guyfedwards guyfedwards commented Aug 12, 2021

Description
adds --fill-commit-body flag to add all the commit bodies to the MR description
when creating an my with --fill

closes #795

Related Issue
Resolves #795

How Has This Been Tested?
Wrote tests for this and tested on personal gitlab account

Screenshots (if appropriate):
@profclems @zemzale not sure how I feel about the formatting, ends up looking kinda weird because of the indentation

2021-08-12_005937

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 Aug 12, 2021

Codecov Report

Merging #819 (52126c4) into trunk (b8a02b5) will decrease coverage by 0.04%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##            trunk     #819      +/-   ##
==========================================
- Coverage   59.45%   59.41%   -0.05%     
==========================================
  Files          93       93              
  Lines        7357     7364       +7     
==========================================
+ Hits         4374     4375       +1     
- Misses       2601     2607       +6     
  Partials      382      382              
Impacted Files Coverage Δ
commands/mr/create/mr_create.go 33.50% <66.66%> (+3.02%) ⬆️
internal/config/config_migration.go 0.00% <0.00%> (ø)
internal/config/local_config.go 31.81% <0.00%> (+5.73%) ⬆️
internal/config/file.go 100.00% <0.00%> (+12.90%) ⬆️

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 b8a02b5...52126c4. Read the comment docs.

zemzale
zemzale previously approved these changes Aug 12, 2021
Copy link
Collaborator

@zemzale zemzale left a comment

Choose a reason for hiding this comment

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

Nice work @guyfedwards. LGTM.

The formatting maybe is not the best, but I can't think of anything better. I am for adding a feature and improving upon it later on

@profclems
Copy link
Owner

Screenshots (if appropriate):
@profclems @zemzale not sure how I feel about the formatting, ends up looking kinda weird because of the indentation

2021-08-12_005937

I'm not convinced about this too. Looks really weird. To fix this in markdown, you need two spaces after the first line like so:

- first line <space><space>
this is the commit description

This will be rendered as expected:

  • this is a test commit title
    this is the commit description
    and a really long one.
  • this is a second test commit title
    this is the commit descriptions
    for the second commit

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.

Please add usage examples here:

Example: heredoc.Doc(`
$ glab mr new
$ glab mr create -a username -t "fix annoying bug"
$ glab mr create -f --draft --label RFC
$ glab mr create --fill --yes --web
`),

commands/mr/create/mr_create.go Outdated Show resolved Hide resolved
adds --fill-commit-body flag to add all the commit bodies to the MR description
when creating an my with --fill

closes profclems#795
@guyfedwards
Copy link
Contributor Author

@profclems I have made the requested changes but github seems to be stuck thinking I haven't?

@profclems profclems merged commit 8364e9c into profclems:trunk Aug 23, 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.

Add commit bodies on MRs with multiple commits
3 participants