Skip to content

feat: add method for janus-cli package metadata ; generate updates to package.json for all plugins listed in plugins/plugin-metadata.json #1627

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

Closed
wants to merge 19 commits into from

Conversation

nickboldt
Copy link
Member

@nickboldt nickboldt commented May 9, 2024

What does this PR do?

feat: add method for janus-cli package metadata RHIDP-1502 ;
generate updates to package.json for all plugins listed in plugins/plugin-metadata.json

Signed-off-by: Nick Boldt [email protected]

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

N/A (or see commit message above for issue number)

How to test this PR?

  • check out PR
  • run stuff like thiis:
./packages/cli/bin/janus-cli package metadata --help
./packages/cli/bin/janus-cli package metadata --dir plugins/acr --keywords "lifecycle:foo,support:baz,feature:stuff"
cd plugins/argocd; ../../packages/cli/bin/janus-cli package metadata --author foo --license bar --homepage http://bazbar --bugs https://woot

Or use the script wrapper to run against a list of plugins:

cat ./plugins/plugin-metadata.json
./plugins/plugin-metadata.sh

Followup tasks would be to contribute this script / app to upstream community-plugins repo, so we can run it against existing/future plugins and incorporate it into lifecycle automation.

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@nickboldt nickboldt requested a review from a team as a code owner May 9, 2024 12:55
@coreydaley
Copy link

/lgtm

@nickboldt nickboldt requested a review from a team as a code owner May 9, 2024 14:04
@openshift-ci openshift-ci bot removed the lgtm label May 9, 2024
Copy link

openshift-ci bot commented May 9, 2024

New changes are detected. LGTM label has been removed.

Copy link

openshift-ci bot commented May 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: coreydaley

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nickboldt nickboldt marked this pull request as draft May 9, 2024 14:05
@nickboldt nickboldt removed the approved label May 9, 2024
@openshift-ci openshift-ci bot added the approved label May 9, 2024
@nickboldt nickboldt force-pushed the RHIDP-1502-add-plugin-metadata branch 3 times, most recently from 403489a to 58a5137 Compare May 9, 2024 19:46
@nickboldt nickboldt changed the title doc: RHIDP-1502 add plugin... feat: RHIDP-1502 add plugin... May 10, 2024
@nickboldt nickboldt changed the title feat: RHIDP-1502 add plugin... feat: RHIDP-1502 add method for janus-cli package metadata May 10, 2024
@nickboldt nickboldt marked this pull request as ready for review May 10, 2024 15:41
@nickboldt nickboldt requested a review from a team as a code owner May 10, 2024 15:41
@nickboldt nickboldt force-pushed the RHIDP-1502-add-plugin-metadata branch from e7fa4f8 to 601a855 Compare May 10, 2024 16:10
@nickboldt nickboldt force-pushed the RHIDP-1502-add-plugin-metadata branch from 601a855 to 4029b16 Compare May 10, 2024 16:25
@nickboldt nickboldt requested review from a team and AndrienkoAleksandr as code owners May 10, 2024 18:21
nickboldt and others added 18 commits May 16, 2024 13:27
Signed-off-by: Nick Boldt <[email protected]>

experimenting with a new packages/cli/src/commands/metadata/index.ts command

Signed-off-by: Nick Boldt <[email protected]>

lint changes and fix to readme

Signed-off-by: Nick Boldt <[email protected]>

implement metadata generation from CODEOWNERS and some hardcoded values

Signed-off-by: Nick Boldt <[email protected]>

implement metadata generation from CODEOWNERS and some hardcoded values

Signed-off-by: Nick Boldt <[email protected]>

quieter output; updated sample; regen yarn lock

Signed-off-by: Nick Boldt <[email protected]>

quieter output; updated sample; regen yarn lock

Signed-off-by: Nick Boldt <[email protected]>

move hardcoded defaults into cmdline options; support running in root folder against a specific plugins/* folder

Signed-off-by: Nick Boldt <[email protected]>

change description and instuctions

Signed-off-by: Nick Boldt <[email protected]>

include script for batch updating all the RH supported plugins included in showcase; for now, don't update metadata in the non-included plugins

Signed-off-by: Nick Boldt <[email protected]>

switch from execSync to run git to using gitconfiglocal (to just parse the .git/config file) (sonarlint)

Signed-off-by: Nick Boldt <[email protected]>
Signed-off-by: Nick Boldt <[email protected]>

experimenting with a new packages/cli/src/commands/metadata/index.ts command

Signed-off-by: Nick Boldt <[email protected]>

lint changes and fix to readme

Signed-off-by: Nick Boldt <[email protected]>

implement metadata generation from CODEOWNERS and some hardcoded values

Signed-off-by: Nick Boldt <[email protected]>

implement metadata generation from CODEOWNERS and some hardcoded values

Signed-off-by: Nick Boldt <[email protected]>

quieter output; updated sample; regen yarn lock

Signed-off-by: Nick Boldt <[email protected]>

quieter output; updated sample; regen yarn lock

Signed-off-by: Nick Boldt <[email protected]>

move hardcoded defaults into cmdline options; support running in root folder against a specific plugins/* folder

Signed-off-by: Nick Boldt <[email protected]>

change description and instuctions

Signed-off-by: Nick Boldt <[email protected]>

include script for batch updating all the RH supported plugins included in showcase; for now, don't update metadata in the non-included plugins

Signed-off-by: Nick Boldt <[email protected]>

switch from execSync to run git to using gitconfiglocal (to just parse the .git/config file) (sonarlint)

Signed-off-by: Nick Boldt <[email protected]>

switch yarn lock to use registry.yarnpkg.com

Signed-off-by: Nick Boldt <[email protected]>
Signed-off-by: Nick Boldt <[email protected]>

add TODOs to the plugins/plugin-metadata.sh and plugins/plugin-metadata.json files

Signed-off-by: Nick Boldt <[email protected]>
* feat: RHIDP-1502 add method for janus-cli package metadata

Signed-off-by: Nick Boldt <[email protected]>

experimenting with a new packages/cli/src/commands/metadata/index.ts command

Signed-off-by: Nick Boldt <[email protected]>

lint changes and fix to readme

Signed-off-by: Nick Boldt <[email protected]>

implement metadata generation from CODEOWNERS and some hardcoded values

Signed-off-by: Nick Boldt <[email protected]>

implement metadata generation from CODEOWNERS and some hardcoded values

Signed-off-by: Nick Boldt <[email protected]>

quieter output; updated sample; regen yarn lock

Signed-off-by: Nick Boldt <[email protected]>

quieter output; updated sample; regen yarn lock

Signed-off-by: Nick Boldt <[email protected]>

move hardcoded defaults into cmdline options; support running in root folder against a specific plugins/* folder

Signed-off-by: Nick Boldt <[email protected]>

change description and instuctions

Signed-off-by: Nick Boldt <[email protected]>

include script for batch updating all the RH supported plugins included in showcase; for now, don't update metadata in the non-included plugins

Signed-off-by: Nick Boldt <[email protected]>

switch from execSync to run git to using gitconfiglocal (to just parse the .git/config file) (sonarlint)

Signed-off-by: Nick Boldt <[email protected]>

* include individual plugin/*/package.json updates

Signed-off-by: Nick Boldt <[email protected]>

* feat: RHIDP-1502 add method for janus-cli package metadata

Signed-off-by: Nick Boldt <[email protected]>

experimenting with a new packages/cli/src/commands/metadata/index.ts command

Signed-off-by: Nick Boldt <[email protected]>

lint changes and fix to readme

Signed-off-by: Nick Boldt <[email protected]>

implement metadata generation from CODEOWNERS and some hardcoded values

Signed-off-by: Nick Boldt <[email protected]>

implement metadata generation from CODEOWNERS and some hardcoded values

Signed-off-by: Nick Boldt <[email protected]>

quieter output; updated sample; regen yarn lock

Signed-off-by: Nick Boldt <[email protected]>

quieter output; updated sample; regen yarn lock

Signed-off-by: Nick Boldt <[email protected]>

move hardcoded defaults into cmdline options; support running in root folder against a specific plugins/* folder

Signed-off-by: Nick Boldt <[email protected]>

change description and instuctions

Signed-off-by: Nick Boldt <[email protected]>

include script for batch updating all the RH supported plugins included in showcase; for now, don't update metadata in the non-included plugins

Signed-off-by: Nick Boldt <[email protected]>

switch from execSync to run git to using gitconfiglocal (to just parse the .git/config file) (sonarlint)

Signed-off-by: Nick Boldt <[email protected]>

switch yarn lock to use registry.yarnpkg.com

Signed-off-by: Nick Boldt <[email protected]>

* add missing type declaration for gitconfiglocal

Signed-off-by: Nick Boldt <[email protected]>

* add missing copyright / fix date

Signed-off-by: Nick Boldt <[email protected]>

add TODOs to the plugins/plugin-metadata.sh and plugins/plugin-metadata.json files

Signed-off-by: Nick Boldt <[email protected]>

* process all 42 plugins in the repo

Signed-off-by: Nick Boldt <[email protected]>

* process all 42 plugins in the repo

Signed-off-by: Nick Boldt <[email protected]>

* refactor command.ts

Signed-off-by: Paul Schultz <[email protected]>

* fix sh

Signed-off-by: Paul Schultz <[email protected]>

* add lines

Signed-off-by: Paul Schultz <[email protected]>

* Update packages/cli/src/commands/metadata/command.ts

---------

Signed-off-by: Nick Boldt <[email protected]>
Signed-off-by: Paul Schultz <[email protected]>
Co-authored-by: Nick Boldt <[email protected]>
Signed-off-by: Nick Boldt <[email protected]>
Signed-off-by: Nick Boldt <[email protected]>
Signed-off-by: Nick Boldt <[email protected]>
Signed-off-by: Nick Boldt <[email protected]>
Signed-off-by: Nick Boldt <[email protected]>
Signed-off-by: Nick Boldt <[email protected]>
@nickboldt nickboldt force-pushed the RHIDP-1502-add-plugin-metadata branch from 239afff to 0801f75 Compare May 16, 2024 16:27
@openshift-merge-robot
Copy link

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

"@janus-idp/maintainers-plugins",
"@janus-idp/devex-uxe"
],
"author": "The Backstage Community"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@riginoommen @deshmukhmayur what should be there in author field?

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
19 Security Hotspots
38.7% Duplication on New Code (required ≤ 3%)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@nickboldt
Copy link
Member Author

replaced by #1753

@nickboldt nickboldt closed this May 30, 2024
@schultzp2020 schultzp2020 deleted the RHIDP-1502-add-plugin-metadata branch September 25, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants