x-motemen/git-pr-release

Merging PR body seems to be buggy when old_body is modified

shirakia opened this issue · 0 comments

This issue is partially related to #20

Step to reproduce

  1. Do git-pr-release, then the release PR body is
- [ ] #1 Init new func @test_user
- [ ] #2 Add new func @test_user2
  1. Edit PR body like
- [ ] #1 Init new func @test_user
- [ ] #2 Add new func @test_user2

In this PR, we've done blah blah blah ...

When we release, we should do blah blah blah ...
  1. Merge new some PRs into staging branch

  2. Do git-pr-release again

Result

The release PR body is

- [ ] #1 Init new func @test_user
- [ ] #2 Add new func @test_user

- [ ] #3 Fix bugs @test_user
In this PR, we've done blah blah blah ...
- [ ] #4 Add more func @test_user

- [ ] #5 Refactor a bit @test_user
When we release, we should do blah blah blah ...
- [ ] #6 hogehoge @test_user"

Expected results

- [ ] #1 Init new func @test_user
- [ ] #2 Add new func @test_user
- [ ] #3 Fix bugs @test_user
- [ ] #4 Add more func @test_user
- [ ] #5 Refactor a bit @test_user
- [ ] #6 hogehoge @test_user"

In this PR, we've done blah blah blah ...

When we release, we should do blah blah blah ...

Or

- [ ] #1 Init new func @test_user
- [ ] #2 Add new func @test_user

In this PR, we've done blah blah blah ...

When we release, we should do blah blah blah ...

- [ ] #3 Fix bugs @test_user
- [ ] #4 Add more func @test_user
- [ ] #5 Refactor a bit @test_user
- [ ] #6 hogehoge @test_user"

Now I'm trying to fix merge_pr_body method to return my expected result.