You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this library + service! It is wonderful!
Goal
On gradio we publish a large number of packages and the comment is very noisy, even with the current accordion implementation. We also have a number of other comments that are generated as part of our CI process.
It would be great if we could could have some more control over the the comment created.
Proposed solution
While it may be possible to make the comment configurable, i think this will probably just result in a seemingly infinite loop of tweaks and options.
I think the best solution would be to export some metadata for the previews, so that users can do what they want with it. I think it is unreasonable to print this to stdout via the CLI due to the long length of the data, saving it to a json file seems most appropriate.
I think this would be great:
pnpx pkg-pr-new publish --json
This would save the meatadata to a json file (pkg-pr-new.json or something)
We could also allow users to set the file path:
pnpx pkg-pr-new publish --json=path/file.json
Metadata structure
For forwards compatibility reasons, i think it would make sense to have a json object with a publishedPackages key, rather than a plain json array.
The packages themselves only need to list the name and the two preview links that are generated (i think pkg.pr.new generates both a PR suffix and a sha shorthash prefix version of the urls?). So something like this:
interfacePackage{name: string;sha_url: string;pr_url: string;template: string}interfaceMetadata{workflow_url: string;// url to the pkg.pr.new. workflowpublishedPackages: Package[]// we could add additional metadata if needed// such as the commit sha, pr number, repo, etc}
I like this approach because it should work well with some of the other proposed changes, would only tell you about new publishes (rather than the contents of your workspace), and should be flexible enough so that more information could be added in the future. It also gives the user plenty of flexibility without placing a huge maintenance burden on this library.
The text was updated successfully, but these errors were encountered:
Thanks for this library + service! It is wonderful!
Goal
On gradio we publish a large number of packages and the comment is very noisy, even with the current accordion implementation. We also have a number of other comments that are generated as part of our CI process.
It would be great if we could could have some more control over the the comment created.
Proposed solution
While it may be possible to make the comment configurable, i think this will probably just result in a seemingly infinite loop of tweaks and options.
I think the best solution would be to export some metadata for the previews, so that users can do what they want with it. I think it is unreasonable to print this to stdout via the CLI due to the long length of the data, saving it to a json file seems most appropriate.
I think this would be great:
This would save the meatadata to a json file (
pkg-pr-new.json
or something)We could also allow users to set the file path:
Metadata structure
For forwards compatibility reasons, i think it would make sense to have a json object with a
publishedPackages
key, rather than a plain json array.The packages themselves only need to list the
name
and the two preview links that are generated (i thinkpkg.pr.new
generates both a PR suffix and a sha shorthash prefix version of the urls?). So something like this:I like this approach because it should work well with some of the other proposed changes, would only tell you about new publishes (rather than the contents of your workspace), and should be flexible enough so that more information could be added in the future. It also gives the user plenty of flexibility without placing a huge maintenance burden on this library.
The text was updated successfully, but these errors were encountered: