asyncapi / .github

Location of all reusable community health files
30 stars 66 forks source link

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

Open derberg opened 2 years ago

derberg commented 2 years ago

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 https://github.com/asyncapi/parser-js/issues/427

smoya commented 2 years ago

@derberg FYI I created an issue in every repository that still sticks to package-lock version 2.

https://github.com/asyncapi/spec-json-schemas/issues/272 https://github.com/asyncapi/asyncapi-react/issues/652 https://github.com/asyncapi/parser-js/issues/652 https://github.com/asyncapi/extensions-catalog/issues/105 https://github.com/asyncapi/converter-js/issues/147 https://github.com/asyncapi/generator/issues/853 https://github.com/asyncapi/tck/issues/159 https://github.com/asyncapi/studio/issues/449 https://github.com/asyncapi/html-template/issues/380 https://github.com/asyncapi/markdown-template/issues/301 https://github.com/asyncapi/github-action-for-generator/issues/260 https://github.com/asyncapi/generator-hooks/issues/98 https://github.com/asyncapi/vs-asyncapi-preview/issues/129 https://github.com/asyncapi/shape-up-process/issues/111 https://github.com/asyncapi/chatbot/issues/69 https://github.com/asyncapi/create-glee-app/issues/135

github-actions[bot] commented 1 year ago

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

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 :heart:

derberg commented 1 year ago

wdyt?

smoya commented 1 year ago

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

derberg commented 1 year ago

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[bot] commented 1 year ago

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

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 :heart: