Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/reports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Generate Report

on:
schedule:
- cron: 0 0 * * 0
workflow_dispatch:

permissions:
pull-requests: write
contents: write

jobs:
generate_report:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./reports
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- name: Run install
run: npm install

- name: Run generator
run: node --run generate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create/update pull request
uses: gr2m/create-or-update-pull-request-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: >
Here's the new weekly report for the expressjs, jshttp, and pillar.js organizations.
branch: report
commit-message: 'docs: generate weekly report'
title: 'docs: generate weekly report'
assignees: bjohansebas
auto-merge: squash
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
# tooling
Tooling used in the project.

Tooling used in the project.

Simple scripts without extra fuss to help with the project. Written with less effort and more focus on the task at hand.

## Reports

This directory contains the weekly triage reports for the Express.js organizations ([expressjs](https://github.com/expressjs), [jshttp](https://github.com/jshttp), [pillarjs](https://github.com/pillarjs)). The goal is to make it easier to see which issues and pull requests were created during the week, and to help with triage efforts within the organization.

You can find the reports in the `reports` directory

## Scripts
### `owner/create-label.mjs` - Create Label
Allows you to create a label in all existing repositories in an organization.

### `triage/subscribe-to-org-repos.js` - Subscribe to Org Repos
### `scripts/owner/create-label.mjs` - Create Label

Allows you to create a label in all existing repositories in an organization.

### `scripts/triage/subscribe-to-org-repos.js` - Subscribe to Org Repos

Allows you to subscribe to all repositories in an organization.

## Usage
### Usage

1. Clone the repository
2. Install the required dependency for the script you want to use
3. Make necessary changes to the script
4. Run the script

## Note
- Your GitHub token should have the necessary permissions to perform the actions.

### Note

- Your GitHub token should have the necessary permissions to perform the actions.
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "tooling",
"private": true,
"workspaces": [
"reports"
]
}
Empty file added reports/expressjs/.gitkeep
Empty file.
19 changes: 19 additions & 0 deletions reports/generate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { writeFile } from "node:fs/promises";
import { resolve } from "node:path";
import generate from "@retrogen/generate";
import { DateTime } from "luxon";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

luxon and @retrogen/generate are not listed in the pkg.json


for await (const organization of ["expressjs", "pillarjs", "jshttp"]) {
const now = DateTime.now();
const then = now.minus({ days: 7 });

const dates = {
start: then.toISODate(),
end: now.toISODate(),
};

const report = await generate(organization, dates);

// write the data out to a file
await writeFile(resolve(`./${organization}/${dates.start}.md`), report);
}
Empty file added reports/jshttp/.gitkeep
Empty file.
17 changes: 17 additions & 0 deletions reports/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"private": true,
"type": "module",
"scripts": {
"lint": "biome check",
"lint:fix": "biome check --fix",
"generate": "node generate.js"
},
"license": "MIT",
"dependencies": {
"@retrogen/generate": "^0.0.2",
"luxon": "^2.3.2"
},
"devDependencies": {
"@biomejs/biome": "1.9.4"
}
}
Empty file added reports/pillarjs/.gitkeep
Empty file.
File renamed without changes.