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

Export Action output as JSON #29

Open
wtrocki opened this issue Aug 23, 2023 · 3 comments
Open

Export Action output as JSON #29

wtrocki opened this issue Aug 23, 2023 · 3 comments

Comments

@wtrocki
Copy link
Contributor

wtrocki commented Aug 23, 2023

Current process

Current Action prints values to console:

golang.org/x/exp/apidiff
  Incompatible changes:
  - Report.Compatible: removed
  - Report.Incompatible: removed
  Compatible changes:
  - Change: added
  - Report.Changes: added

and fails if incompatible changes are present.

Expected result

  1. Action should return values as action.output.
  2. Action should return values as json

#28 does first step to introduce some level of output.
Users can put output value as comments on PRs or even parse it.

@wtrocki wtrocki changed the title Export Action output Export Action output as JSON Aug 23, 2023
@joelanford
Copy link
Owner

I had a similar thought here: #21 (comment)

I'll get to this eventually, but I'm also happy to accept a contribution as well!

@wtrocki
Copy link
Contributor Author

wtrocki commented Aug 28, 2023

I think realistically JSON output should be:

{
"message": (actual output)
"semver_type": (added in  https://github.com/joelanford/go-apidiff/pull/28)
} 

@wtrocki
Copy link
Contributor Author

wtrocki commented Aug 28, 2023

Implemented in #32. @joelanford this is up to your consideration.
IMHO parsing of the Incompatible changes: can happen outside the action source code as it is subject to change and might affect long-term support of the action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants