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

adds dry-run support and outputs #21

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

pabloromeo
Copy link
Contributor

Adds support for the dry-run CLI option, as well as output parameters to the github action. The new outputs are 2:

  1. The stringified JSON of the CLI output
  2. A table-like structured output of the CLI results

One comment:
When doing a dry-run, if you run it on a PR branch, articles which have no actual changes will still show up as changed, given that the source of the image URLs include the branch name and it will be different between a branch and main.

Given that I've manually moved the changes from another fork you might want to give it a try before merging, to make sure nothing breaks.

@sinedied
Copy link
Owner

Thanks, looks good to me!
I'll probably move the table formatting into the devto CLI at some point as it already have related features, to factorize things a bit.

Now I just need to do some testing and I'll publish the updated action 🎉

@sinedied sinedied merged commit c591103 into sinedied:main Feb 24, 2022
@sinedied
Copy link
Owner

Regarding the changes in the PR branch, this is something that could probably be fixed in the CLI, ie ignoring branch changes when doing the comparison using a flag.

@pabloromeo pabloromeo deleted the feat/dry-run-functionality branch February 24, 2022 14:18
@pabloromeo
Copy link
Contributor Author

Thanks, looks good to me! I'll probably move the table formatting into the devto CLI at some point as it already have related features, to factorize things a bit.

Now I just need to do some testing and I'll publish the updated action 🎉

Sounds great! Yeah, in fact that's what I used as basis for this, so it probably makes more sense to unify it in the CLI.
The table formatting in there I mainly used to auto-comment the PR with the results. I initially tried formatting it outside using the JSON as source but it was a bit cumbersome and hacky so just went with exposing it already formatted and keeping my build a bit simpler. I found github action jobs and steps to not play very nice with stringified json as parameters hehe.

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

Successfully merging this pull request may close these issues.

2 participants