Skip to content

Commit

Permalink
Use a <details> node to reintroduce ASCII git graph in backmerge
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Sep 16, 2024
1 parent 205fc54 commit a9a887e
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,29 @@ def self.create_backmerge_pr(token:, repository:, title:, head_branch:, base_bra
```
GRAPH

ascii_git_graph = <<~GRAPH
```
#{head_branch.rjust(40)} ----o-- - - -
#{' ' * 40} \\
#{intermediate_branch.rjust(40)} `---.
#{' ' * 40} \\
#{base_branch.rjust(40)} ------------x- - -
```
GRAPH

pr_body = <<~BODY
Merging `#{head_branch}` into `#{base_branch}`.
Via intermediate branch `#{intermediate_branch}`, to help fix conflicts if any:
#{meramid_git_graph}
<details>
<summary>Expand to see an ASCII representation of the Git graph above</summary>
#{ascii_git_graph}
</details>
BODY

other_action.create_pull_request(
Expand Down

0 comments on commit a9a887e

Please sign in to comment.