Skip to content

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

Open

Description

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.

Activity

  1. ghost added
    type: featureNew feature or feature request
    on Feb 24, 2022
  2. EndBug commented on Feb 24, 2022

    @EndBug
    Owner

    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!

  3. delhiryder commented on Oct 13, 2022

    @delhiryder

    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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions