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

PR level check that verifies if contributed package-lock.json is created with v2 #177

Open
derberg opened this issue Sep 15, 2022 · 6 comments
Labels
enhancement New feature or request stale

Comments

@derberg
Copy link
Member

derberg commented Sep 15, 2022

We need a new global workflow, with a dedicated configuration in https://github.com/asyncapi/.github/blob/master/.github/workflows/global-replicator.yml that only certain projects can opt into if they want

The goal is that it runs on a PR and it checks if the PR modifies package-lock.json and the file is created with "lockfileVersion": 2. Otherwise the check fails and we post a nice friendly comment saying "oy, sorry but we use lockfileVersion 2, so please make sure you are not using npm 6 to install dependencies in the project, thanks a 💯 " (just an example 😄 ).

Then once the fix is done, we remove the bot comment

related to asyncapi/parser-js#427

@derberg derberg added the enhancement New feature or request label Sep 15, 2022
@github-actions
Copy link

github-actions bot commented Feb 9, 2023

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Feb 9, 2023
@derberg
Copy link
Member Author

derberg commented Apr 19, 2023

  • we need to be flexible, so if someone wan't to use package-lock v2 and not v3 that is fine. So the check that we roll out must support validation of any version
  • we need a composite reusable action that checks package-lock version from the default branch, and verifies it against version coming from the PR
  • now problem is that what if someone intentionally want to switch from v2 to v3? CI will always complain. So we need to make sure that maintainer of given repo can say, "yo, my package lock version for my repo is v2". I think this can be only done through GitHub repo variables:
    Screenshot 2023-04-19 at 12 04 13

wdyt?

@smoya
Copy link
Member

smoya commented Apr 19, 2023

Maybe we could just check, in the git diff, that the lockVersion is not being degraded? I.e. from 3 to 2.

Copy link
Member Author

derberg commented Apr 19, 2023

we would have to assume that nobody intentionally will degrade. But I guess it is not a bad assumption 🤔

you think variables are not good? we can easily set org variable to 2 and then on repo level maintainers can override with local variable

@github-actions github-actions bot removed the stale label Apr 20, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

2 participants