Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rover subgraph check --output markdown #839

Closed
busches opened this issue Sep 22, 2021 · 5 comments
Closed

Rover subgraph check --output markdown #839

busches opened this issue Sep 22, 2021 · 5 comments
Assignees
Labels
docs 📝 improvements or additions to docs on the docs site
Milestone

Comments

@busches
Copy link

busches commented Sep 22, 2021

Description

We are currently migrating from the apollo CLI to the new rover CLI and we use the --markdown option of apollo service:check to send comments back to GitHub. I didn't see an issue tracking this feature request, outside the documentation saying it's not ready yet. https://www.apollographql.com/docs/rover/migration/#machine-readable-output

Old command for reference: https://www.npmjs.com/package/apollo#apollo-servicecheck

@busches busches added feature 🎉 new commands, flags, functionality, and improved error messages triage issues and PRs that need to be triaged labels Sep 22, 2021
@EverlastingBugstopper
Copy link
Contributor

EverlastingBugstopper commented Sep 22, 2021

Hey @busches - thanks for the report. It looks like the docs you linked here are actually a bit out of date as we do have support for --output json (though still no --output markdown).

I'm going to update the docs to point this out - there aren't any plans to include --output markdown but if there's enough interest we'll prioritize.

For now, I'd try --output json out for a spin and see if you can get some comments going, even if they aren't auto-formatted.

@busches
Copy link
Author

busches commented Sep 22, 2021

We did try JSON, but the plain output for now is much easier to read, but formatted poorly, since the text table isn't a markdown table.

Hopefully the interest is there, otherwise if someone submitted a PR adding it, would you be open to it?

@EverlastingBugstopper
Copy link
Contributor

We did try JSON, but the plain output for now is much easier to read, but formatted poorly, since the text table isn't a markdown table.

Have you tried piping to jq to just get portions of the data you need? I have a gist of a bash script you could use to get what you're looking for if you're interested.

Otherwise if someone submitted a PR adding it, would you be open to it?

Sure - I'd love to help with contributions. I will say that this is likely a semi-large undertaking as we'd need to add support for --output markdown for all of the other Rover commands, since --output is a global option.

If that doesn't dissuade you though, I'd recommend reading through our contributing doc and our architecture doc.

From there, you'll have to add a new possible value of Markdown to OutputType in src/cli.rs, and the compiler should help you through the rest of the refactor, but it will require well-formatted markdown for all of the possible outputs enumerated in RoverOutput in src/command/output.rs

@busches
Copy link
Author

busches commented Sep 23, 2021

@EverlastingBugstopper We'll give that gist a run through, likely will do everything we want. 🎉 Probably should share that more broadly :)

@EverlastingBugstopper
Copy link
Contributor

EverlastingBugstopper commented Sep 23, 2021

I've added the gist to both our migration guide docs and in the --output json section of the docs in #840 and also opened a new issue to track --output markdown across all commands in #843

@EverlastingBugstopper EverlastingBugstopper added 2021-09 triage issues and PRs that need to be triaged docs 📝 improvements or additions to docs on the docs site and removed triage issues and PRs that need to be triaged feature 🎉 new commands, flags, functionality, and improved error messages labels Sep 23, 2021
@EverlastingBugstopper EverlastingBugstopper added this to the v0.3.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs 📝 improvements or additions to docs on the docs site
Projects
None yet
Development

No branches or pull requests

2 participants