version-check icon indicating copy to clipboard operation
version-check copied to clipboard

[Feature] Compare branch package.json to main package.json

Open ghost opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. I need to be able to ensure PRs for my project have bumped the project package.json version when they commit new code.

Describe the solution you'd like I want an action to fail a check if package.json hasn't been bumped by running this action from my branch against the main branch. Rather than specifying a file-url, it would be nice to be able to specify a branch instead, and then compare the two that way.

Describe alternatives you've considered N/a

Additional context Add any other context or screenshots about the feature request here.

ghost avatar Feb 24 '22 20:02 ghost

Hi, thanks for opening the issue It would be nice having a dedicated option, but for the time being, you can just enter the GitHub Raw URL in the file-url input and that should work I'll keep this in mind though!

EndBug avatar Feb 24 '22 21:02 EndBug

Hi @EndBug - Great little github action ! I am also facing the same problem. I have tried to get this feature working by overloading the file-url input (with the latest version if the package.json file on the target branch of the pull request) and the assume-same-versions input set to old. However, my repository is private, so while the action (correctly) handles the ::before special string (by appending the github token to it), I get various failures (different ones for v1 and v2) if I put in the raw URL of my file. Any thoughts on how this could be addressed ? (One way would be extend this syntax, to say something like ::branch-name=<insert-branch-name>. This modification would be the least disruptive, I think) Regards, Sidd (delhiryder)

delhiryder avatar Oct 13 '22 15:10 delhiryder