auto icon indicating copy to clipboard operation
auto copied to clipboard

Custom PR description message for canary releases

Open jackw opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe.

I would like to be able to customise the code block in the message that auto drops in a PR after a successful canary publish to NPM. I'm sure at some point in time I found documentation about it but looking at the code I don't think its possible. I tried doing the following in .autorc

"canary": {
    "target": "pr-body",
    "message": "Install PR version: `yarn add -D my-project@%v`",
    "force": true // <-- just to see the results in the PR
},

But it only allows editing the summary not the code block.

Describe the solution you'd like

I would like to be able to customise the canary message in PR descriptions to read something like:

:sparkles: Test out this PR locally via:

npx @grafana/[email protected]
# or 
yarn create @grafana/[email protected]
# or
pnpm dlx @grafana/[email protected]

Describe alternatives you've considered

Not thought of any alternatives currently.

Additional context

jackw avatar Apr 21 '23 15:04 jackw

I think a installStyle option would make sense. Set it to block and get a code block

Would you want to submit a PR for this?

hipstersmoothie avatar May 11 '23 01:05 hipstersmoothie

@hipstersmoothie I'm happy to submit a PR for this.

I think a installStyle option would make sense. Set it to block and get a code block

Just to make sure we're on the same page here are you suggesting something like this for the API?

"canary": {
    "installStyle": "block",
    "codeBlock": `npx @grafana/create-plugin@%v
# or 
yarn create @grafana/plugin@%v
# or
pnpm dlx @grafana/plugin@%v`,
},

jackw avatar May 11 '23 08:05 jackw

Yeah just like that

hipstersmoothie avatar May 11 '23 08:05 hipstersmoothie

@jackw @hipstersmoothie was this resolved? If not, I'd like to take this up.

XDRAGON2002 avatar Sep 30 '23 20:09 XDRAGON2002

Go ahead and try

hipstersmoothie avatar Sep 30 '23 21:09 hipstersmoothie