-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add GitHub Actions workflow for weekly report generation #6
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
Open
bjohansebas
wants to merge
2
commits into
expressjs:main
Choose a base branch
from
bjohansebas:reports
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| package-lock=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "tooling", | ||
| "private": true, | ||
| "workspaces": [ | ||
| "reports" | ||
| ] | ||
| } |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"; | ||
|
|
||
| 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.
File renamed without changes.
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
luxonand@retrogen/generateare not listed in the pkg.json