Skip to content

Include structured metadata in created PRs #3465

Closed
@michaelmior

Description

@michaelmior

I'm looking at building some tooling surrounding the PRs generated by Scala Steward. (For example, automerging PRs based on certain conditions.) For this purpose, it would be helpful to have some structured metadata included in the generated PRs. For example, the identifier and name of the package being updated, the new and old version, and the labels that are already available in a comment.

This data can be parsed out of the current PR text, but it would be nice to have something a bit more stable. Probot: metadata has what seems like a reasonable approach of including JSON data in HTML comments such as the below:

<!-- probot = {"json": "here"} -->

Something like this would be much less brittle than parsing the current PR text. As a more concrete example, for this PR, the metadata might look like this:

<!-- scala-steward = {"dependencies": [{"groupId": "com.google.protobuf", "artifactId": "protobuf-java", "oldVersion": "3.25.4", "newVersion": "4.28.1", "labels": ["library-update", "early-semver-major", "semver-spec-major", "commit-count:1"]} -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions