sorenlouv / backport

A simple CLI tool that automates the process of backporting commits on a GitHub repo
https://github.com/sqren/backport/blob/main/docs/config-file-options.md
Apache License 2.0
247 stars 60 forks source link

Add structured data to backport PR body #408

Closed brianseeders closed 2 years ago

brianseeders commented 2 years ago

We would like to add structured data as hidden JSON to PRs created by the backport tool. We plan on using this for some upcoming features for Kibana.

PR description max length is 65,536 characters, so space should never be an issue.

What do you think about this? I'm open to other ways of implementing this.

Also: Did I add the new config in the right places to make it available via .backportrc.json?

brianseeders commented 2 years ago

@sqren I can't request your review

sorenlouv commented 2 years ago

Hey @brianseeders

This makes a lot of sense. Ideally you should be able to do this using prDescription option but currently you can't access info like sourceCommit, sourceBranch, author or iterate over commits.

I have two alternatives in mind:

brianseeders commented 2 years ago

The first option with the handler is probably the simplest and most flexible, but I'm not sure how I feel about loading the script contents remotely and executing them, which is what you would need to do, right?

Templating would be fine as well, as long as you can JSON.stringify or similar.

Either way, they are heavier than what we need at the moment

sorenlouv commented 2 years ago

Replaced by https://github.com/sqren/backport/pull/411