intuit/auto

Custom PR description message for canary releases

jackw opened this issue · 5 comments

jackw commented

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:

✨ Test out this PR locally via:

npx @grafana/create-plugin@1.3.0-canary.226.9023d7b.0
# or 
yarn create @grafana/plugin@1.3.0-canary.226.9023d7b.0
# or
pnpm dlx @grafana/plugin@1.3.0-canary.226.9023d7b.0

Describe alternatives you've considered

Not thought of any alternatives currently.

Additional context

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?

jackw commented

@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`,
},

Yeah just like that

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

Go ahead and try