Skip to content

Commit

Permalink
Add GitHub dependents info (#72)
Browse files Browse the repository at this point in the history
* Add GitHub dependents info

* MegaLinter config

* cspell
  • Loading branch information
nvuillam authored Jul 16, 2024
1 parent f1aba46 commit baa2077
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 46 deletions.
92 changes: 48 additions & 44 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,49 @@
{
"ignorePaths": [
"**/node_modules/**",
"**/vscode-extension/**",
"**/.git/**",
".vscode",
"megalinter",
"package-lock.json",
"report"
],
"language": "en",
"version": "0.1",
"words": [
"GHSA",
"GRYPE",
"MARKDOWNLINT",
"Rapha",
"Rapha\u00ebl",
"Th\u00e9riault",
"Vuillamy",
"aarch",
"adoptium",
"adoptopenjdk",
"dotenv",
"eslintcache",
"fileurl",
"hotspot",
"javaw",
"jscoverage",
"jspm",
"mheiges",
"njre",
"nvuillam",
"openj",
"pids",
"raphaeltheriault",
"riault",
"secretlintrc",
"sparcv",
"stefanzweifel",
"venv",
"vuillamy",
"wscript"
]
}
"ignorePaths": [
"**/node_modules/**",
"**/vscode-extension/**",
"**/.git/**",
".vscode",
"megalinter",
"package-lock.json",
"report"
],
"language": "en",
"version": "0.1",
"words": [
"GHSA",
"GRYPE",
"MARKDOWNLINT",
"Rapha",
"Rapha\u00ebl",
"Th\u00e9riault",
"Vuillamy",
"aarch",
"adoptium",
"adoptopenjdk",
"badgemarkdownfile",
"dotenv",
"eslintcache",
"fileurl",
"hotspot",
"javaw",
"jscoverage",
"jspm",
"markdownfile",
"mheiges",
"minstars",
"njre",
"nvuillam",
"openj",
"outputrepo",
"pids",
"raphaeltheriault",
"riault",
"secretlintrc",
"sparcv",
"stefanzweifel",
"venv",
"vuillamy",
"wscript"
]
}
70 changes: 70 additions & 0 deletions .github/workflows/github-dependents-info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# GitHub Dependents Info workflow
# More info at https://github.com/nvuillam/github-dependents-info/
name: GitHub Dependents Info

# Let by default
on:
# On manual launch
workflow_dispatch:
# On every push on selected branches (usually just main)
push:
branches: [main,master,setup-gdi]
# Scheduled interval: Use CRON format https://crontab.guru/
schedule:
- cron: "0 0 * * 0" # Every sunday at midnight

permissions: read-all

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
name: GitHub Dependents Info
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0

# Collect data & generate markdown
- name: GitHub Dependents Info
uses: nvuillam/github-dependents-info@v1.5.1 # If you trust me enough you can replace version by "main" :)
# See documentation for variables details: https://github.com/nvuillam/github-dependents-info?tab=readme-ov-file#%EF%B8%8F-usage
with:
repo: ${{ github.repository }}
outputrepo: ${{ github.repository }}
# markdownfile: docs/github-dependents-info.md
# badgemarkdownfile: README.md
# sort: stars
# minstars: "0"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Workaround for git issues
- name: Prepare commit
run: sudo chown -R $USER:$USER .

# Create pull request
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
branch: github-dependents-info-auto-update
commit-message: "[GitHub Dependents Info] Updated markdown file(s)"
delete-branch: true
title: "[GitHub Dependents Info] Updated markdown file"
body: "_Generated with [github-dependents-info](https://github.com/nvuillam/github-dependents-info), by [Nicolas Vuillamy](https://github.com/nvuillam)_"
labels: documentation
- name: Create PR output
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
1 change: 1 addition & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ DISABLE_ERRORS_LINTERS:
# DISABLE_ERRORS: true # Uncomment if you want MegaLinter to detect errors but not block CI to pass
MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: (DOCS\.md)
YAML_V8R_FILTER_REGEX_EXCLUDE: (appveyor) # Exclude regex for a single linter
ACTION_ACTIONLINT_DISABLE_ERRORS_IF_LESS_THAN: 3
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased] (beta, main branch content)

- Add [github-dependents-info](https://github.com/nvuillam/github-dependents-info)
- Add your updates here !

## [v1.2.2] - 2024-07-16
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# njre

![npm](https://img.shields.io/npm/v/njre.svg)
[![Downloads/week](https://img.shields.io/npm/dw/njre.svg)](https://npmjs.org/package/njre)
[![Downloads/week](https://img.shields.io/npm/dw/njre.svg)](https://npmjs.org/package/njre)<!-- gh-dependents-info-used-by-start --><!-- gh-dependents-info-used-by-end -->
[![MegaLinter](https://github.com/nvuillam/njre/workflows/MegaLinter/badge.svg?branch=master)](https://github.com/nvuillam/njre/actions?query=workflow%3AMegaLinter+branch%3Amain)
[![GitHub stars](https://img.shields.io/github/stars/nvuillam/njre?cacheSeconds=3600)](https://github.com/nvuillam/njre/stargazers/)
[![GitHub contributors](https://img.shields.io/github/contributors/nvuillam/njre.svg)](https://github.com/nvuillam/njre/graphs/contributors/)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/nvuillam)](https://github.com/sponsors/nvuillam)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/njre.svg)

Easily install and use JRE from a Node application.

Expand Down

0 comments on commit baa2077

Please sign in to comment.