Skip to content

Refactor Request: writing the comment-tag at the start of the comment #435

@arieluchka-bse

Description

@arieluchka-bse

hola :)

First of all, Thanks for the extension!!!

i want to use some of the mermaid diagrams and add more to it on every sync to the PR.

right now it can easily be done by upserting to the comment with a mermaid graph (if the code block is not closed):

```mermaid
gitGraph
    commit id: "703ae9e"

Image

Then, if we upsert to the comment:

```mermaid
gitGraph
    commit id: "703ae9e"
    commit id: "1234567"

Image


The problem is, that this action leaves the comment-tag at the buttom of the comment, and then the graph fails to render

```mermaid
gitGraph
    commit id: "703ae9e"
    commit id: "1234567"

<!-- thollander/actions-comment-pull-request "git-graph" -->

Image

Is it possible to move the tag to be written at the start of the comment?
This will open a door of possibilities to anyone who wants to dynamically generate and update those diagrams :)

example:

<!-- thollander/actions-comment-pull-request "git-graph" -->

```mermaid
gitGraph
    commit id: "703ae9e"
    commit id: "1234567"

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions