Closed brianseeders closed 2 years ago
@sqren I can't request your review
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:
.backportrc.js
where you can define a handler that returns a string like prDescription: (commits: Commit[]) => string
Adding a templating language like Mustache or Handlebars
Does those two make sense? Do you have any preference between them?
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
Replaced by https://github.com/sqren/backport/pull/411
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
?