npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kie/chain-status-action

v0.0.5

Published

Generates data for chain status webpage

Downloads

21

Readme

Generate Data JS Tool

This package provides a NodeJS CLI tool which basically consumes information from Github API and/or Jenkins API and generates a JSON file which is retrieved by the React web application.

Usage

This tool can be easy use as a NodeJS CLI tool or as a Github Action

NodeJS CLI Usage

In order to use you just need to install all required libraries, build the project and run the automatically generated distribution file at packages/action/dist/index.js.

  1. Install libraries [run it from the project's root]
$ yarn
  1. Run the tool, this can be done either Command Line Interface approach (see local dev section) or using Github action (see action flow section)

Inputs

In this section you can find overall list of inputs that you can or must provide to the tool, either using cli or using the Github workflow.

| Field | Required | Default | Description | | ------------------ | -------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | github-token | true | | The Github token that must be used to interact with Github API | | definition-file | true | | The file containing all projects for which you want to provide the status, an example - more infos here | | title | false | Project status | The project/webapp title | | subtitle | false | Contribution status | The project/webapp subtitle | | base-branch-filter | false | | A comma separated list of base branches RegEx to be filtered. Like main,7.59.x,8.x or main,^7.* | | project-filter | false | | A comma separated list of project RegEx to be filtered. Like drools,opta.* or jbpm,^drools.* | | created-by | false | github action | The user/machine/whatever that regenerates the report | | created-url | false | | Normally the job generating the info URL | | logger-level | false | info | The log level. 'info' (default) | 'trace' | 'debug' | | gh-pages-branch | false | gh-pages | The branch used by gh-pages tool, where the webpage will be stored | | branches | false | [] | The list of branches for which to provide branches comparison |

Local Execution

In order to locally run this, you simply need to run the cli tool providing at least all required arguments (more details in inputs section)

Here an usage example:

$ node packages/action/src/bin/cli.js -t 'Title' -st 'Subtitle' --token <GH-TOKEN> -df https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/.ci/pull-request-config.yaml [-o <PATH-TO-REACT-WEBAPP-DATA>]

Github Action Flow

This tool can be integrated in a Github action in order to automate the data generation process, for this purpose this project comes with an easy to use Github action that you only need to use in your own Github workflows.

Here the main important steps performed by generate-data action:

  1. Checkout in the branch where you want to store the webpage code and content, the default is gh-pages.
  2. Execute the chain-status tool that, given a set of inputs, compute the configuration files and all the contents that are used by the webpage - this execution is performed using another Github action.
  3. Commit and push the newly generated data in the target branch (e.g., gh-pages).