Skip to content
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

Add support for tracking commits pushed to branch (core) #601

Open
wants to merge 161 commits into
base: activities
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
5046e6e
Fix: Scroll in activity (#425)
kumar11jr Apr 10, 2024
45faacd
hidden leaderboard filters in mobile view (#387)
kshitijv256 Apr 18, 2024
5e7e4c1
Adds support for listing good first issues (#431)
dgparmar14 Apr 18, 2024
cf581ec
fix theme for footer (#420)
rash-27 Apr 18, 2024
b86034b
refactor: implemented dynamic import on /people route (#423)
Re-Dei Apr 18, 2024
31df48e
Adds issue forms (#434)
dgparmar14 Apr 18, 2024
7824651
enable/disable features from env variables (#418)
rash-27 Apr 19, 2024
b306449
Fixes alignment of search icon in leaderboard (#437)
dgparmar14 Apr 19, 2024
5c6144c
fix scraper dry run
rithviknishad Apr 19, 2024
6edf007
Adds APIs and utilities for Slack Activities/EOD Bot (#429)
shivankacker Apr 22, 2024
1e9556d
slack eod bot: fix incorrect env being used in update app home
rithviknishad Apr 22, 2024
a70e1d1
slack eod bot: add logs
rithviknishad Apr 22, 2024
bafe821
slack eod bot: Increase max duration and await for sendMessage
rithviknishad Apr 22, 2024
313af36
daily reports api: adds missing await
rithviknishad Apr 22, 2024
0882029
Slack EOD Bot: Prevent N+1 GraphQL calls to GitHub APIs for pulling r…
rithviknishad Apr 24, 2024
4582ebb
Remove cron from vercel config
rithviknishad Apr 24, 2024
fe7c741
slack eod bot: fix incorrect url
rithviknishad Apr 24, 2024
31d8a55
Added contrbutors OG image using genratemetadata (#396)
dgparmar14 Apr 29, 2024
2bc4806
Use GH Actions to post EOD activities to slack (#441)
rithviknishad Apr 30, 2024
3933218
update EOD updates API
rithviknishad Apr 30, 2024
0d803e2
eod activities: prevent collision of reserved names
rithviknishad Apr 30, 2024
07c9b48
eod activities workflow: fix incorrect script
rithviknishad Apr 30, 2024
44ac3f6
fix script path
rithviknishad Apr 30, 2024
4b7751a
fix imports
rithviknishad Apr 30, 2024
4acfe87
fix octokit import
rithviknishad Apr 30, 2024
c10845b
add env for contributors dir
rithviknishad Apr 30, 2024
069d14b
slack eod activities: fix contributors dir path resolve
rithviknishad Apr 30, 2024
b4ed47b
fix incorrect dir
rithviknishad Apr 30, 2024
1d9fa72
update scripts to make it ready for action
rithviknishad Apr 30, 2024
16e212a
fix leaderboard profile url
rithviknishad Apr 30, 2024
77331a4
Fixed Slack Events Duplicates (#443)
shivankacker Apr 30, 2024
ed3c71e
eod bot: clear updates once workflow completed
rithviknishad May 1, 2024
667e392
Fixed Enhancements to size of filters in Leaderboard page (#444)
rudra321 May 2, 2024
d027c40
Slack EOD Bot: Fixes reminder not working and remove unused API's (#445)
rithviknishad May 2, 2024
40541ac
update `.env` documentation for slack eod bot related envs
rithviknishad May 2, 2024
e528502
EOD Bot : Showing cached app home for one hour (#448)
shivankacker May 2, 2024
0ae56af
fix slack eod message reminder missing await
rithviknishad May 2, 2024
d9cceae
Slack EOD Bot: Ensure postMessage's are not cached (#450)
rithviknishad May 6, 2024
93e2df2
Move Activities Bot reminder to GH Actions (#451)
rithviknishad May 7, 2024
7aeccdb
Switch to CJS: Slack EOD Reminder and Post workflow scripts
rithviknishad May 8, 2024
84ab60a
Switch to MJS: Slack EOD Reminder and Post workflow scripts
rithviknishad May 8, 2024
f4226a7
switch to using imports
rithviknishad May 8, 2024
5235628
adds missing exports
rithviknishad May 8, 2024
b8de51f
switch to using imports for importing in mjs files
rithviknishad May 8, 2024
851a3af
Initialise NPM project for activities bot and lock dependency version…
rithviknishad May 9, 2024
d20af0e
fix incorrect dir.
rithviknishad May 9, 2024
a8d02bb
set working directory for steps
rithviknishad May 9, 2024
d550c28
correct contributors dir
rithviknishad May 9, 2024
dbb2ee9
EOD Reminders: Adds support for retries (#456)
rithviknishad May 19, 2024
e15298c
update scraper dry run workflow dispatch triggers
rithviknishad Jun 26, 2024
917c659
update scraper dry run workflow dispatch triggers
rithviknishad Jun 26, 2024
c9fa7bf
Adds tests for validating github user data as per schema (#460)
rithviknishad Jun 26, 2024
9428747
update scraper to accept git access token secret
rithviknishad Jun 27, 2024
34067f6
fix contributors directory not created if missing
rithviknishad Jun 27, 2024
7540892
Adds sitemap generation for main pages and contributor profiles (#462)
rithviknishad Jul 10, 2024
a090186
slack activities bot: fix spacing issue in reminder messages
rithviknishad Jul 16, 2024
2a56d9b
Migrate scraper to typescript and adds support for GitHub discussions
dgparmar14 Jul 25, 2024
00b3494
Bump requests from 2.31.0 to 2.32.0 in /scraper (#457)
dependabot[bot] Jul 25, 2024
9611a99
remove python github scraper
rithviknishad Jul 25, 2024
2e43bff
Improved page title and description (#468)
sachan13harshit Jul 27, 2024
5e0b16c
prevent scraper from failing due to incorrect impl. of calc. turn aro…
rithviknishad Jul 29, 2024
f288fb3
Redesigned Footer (#474)
mayank1365 Aug 4, 2024
c47a3c7
Add Clickable Link to Footer Image for Partner Website. (#477)
Jash2606 Aug 5, 2024
143866c
Footer re-design (#479)
ayush2743 Aug 5, 2024
38c9654
Updated Social Icons in Contributors Section (#486)
its-harshitgoel Aug 9, 2024
5679711
Adds support for X logo in org. socials and hide undefined social URL…
rithviknishad Aug 11, 2024
3981d2b
fix name's from being number
rithviknishad Aug 13, 2024
eab0190
stringify potential numeric values
rithviknishad Aug 14, 2024
d0a9b8b
envrc: load local envs if present
rithviknishad Aug 14, 2024
3993cf6
Updated the license (#494)
Bprathmesh Aug 14, 2024
e8cb073
Pre-render `/people` page (#493)
rithviknishad Aug 15, 2024
30f39fa
Added hover Effect in Google Summer of Code label (#501)
Indrajeety993648 Aug 19, 2024
53eb84d
Update .env; Refactor to OHC (#504)
gigincg Aug 22, 2024
d49e5f7
Scraper: Fixes incorrect default date range
rithviknishad Aug 22, 2024
eb1cc11
Merge pull request #506 from coronasafe/rithviknishad/fix/scraper-dat…
khavinshankar Aug 22, 2024
4f46253
Scraper: Deduplicate user activities before writing the data (#508)
rithviknishad Aug 23, 2024
dcc24ba
Enhance GitHub Logo Button with Hover Effect (#500)
abhinav26966 Aug 23, 2024
84c50bf
Update org to ohcnetwork in all references (#509)
gigincg Aug 23, 2024
1489657
Fixes #503; Correct event actor for `pr_merged` events (#512)
rithviknishad Sep 4, 2024
805e922
Scrape project board items (experimental) (#514)
rithviknishad Sep 9, 2024
42971e2
Scrape item type in projects board scraper
rithviknishad Sep 9, 2024
f35afd9
Convert to fully static site generation (#513)
rithviknishad Sep 23, 2024
af18830
update nextjs config to output export
rithviknishad Sep 23, 2024
15521ed
remove tailwindcss warning
rithviknishad Sep 23, 2024
be892c2
Bump next from 14.2.5 to 14.2.10 (#515)
dependabot[bot] Sep 24, 2024
576b007
fix: Show nothing instead of 'Still waiting for this' on people page …
syedfardeenjeelani Sep 29, 2024
df5a17c
fix code formatting
rithviknishad Sep 30, 2024
2fac615
fix next config, unoptimized images for export output
rithviknishad Sep 30, 2024
ad4cb04
fix issue with github events no longer sending forkee html url
rithviknishad Sep 30, 2024
8c3cae9
use export output only for builds; skip for dev;
rithviknishad Oct 1, 2024
f5c735c
remove dynamicParams in favour of export output
rithviknishad Oct 1, 2024
2ec2178
Make Contributor Badges Theme Aware (#518)
Jash2606 Oct 1, 2024
bfd14ee
Fix client-side relative time calculation for statically generated ro…
Jash2606 Oct 3, 2024
4f12ea0
update generate md script
rithviknishad Oct 18, 2024
c4092d6
fix: Skip merge commit authors from being included in PR collaborator…
rithviknishad Oct 18, 2024
25a9a7c
Created reusable component for contributors Avatar (#521)
BarryByte Oct 20, 2024
646cda8
feat(leaderboard): add filtering, sorting, and search functionality i…
programmerraja Oct 20, 2024
6e38a43
fix: Responsiveness for Graduate Attributes in Contributor Page (#528)
VAIBHAVSING Oct 22, 2024
f91feaa
Fix (LeaderBoard) filter points bug fixed (#532)
programmerraja Oct 24, 2024
3065798
Add URL to Org Pull Requests from Profile Page
gigincg Oct 29, 2024
6df37e4
fixes role filter not working in leaderboard page
rithviknishad Oct 29, 2024
034d0d0
feat :Duplicate PR collaboration activities closes #531 (#534)
VAIBHAVSING Oct 30, 2024
03dde44
gitignore venv
rithviknishad Oct 30, 2024
856a176
update scraper workflow to continue workflow even if slack scraper fails
rithviknishad Oct 30, 2024
8aa04ed
remove unused workflow
rithviknishad Oct 30, 2024
17de936
optimise activity de-duplicate script to skip writing for files witho…
rithviknishad Oct 30, 2024
b53bcf9
use event type and title as hash key for de-deuplication
rithviknishad Oct 30, 2024
ef5bbf1
improve de-duplicate script
rithviknishad Oct 30, 2024
7c68455
fix de-duplicate script
rithviknishad Oct 30, 2024
f0dcce4
fix de-duplicate script
rithviknishad Oct 30, 2024
69969b9
fix: skip review events for PR authors (#537)
Srayash Nov 5, 2024
f5c0b72
gh scraper: fix incorrect check for review event skip
rithviknishad Nov 5, 2024
1fb9cdf
Adds support for showing summary in leaderboard (#544)
rithviknishad Nov 14, 2024
700b2ca
Caching profile activity filters using `atomWithStorage` (#547)
pooranjoyb Nov 20, 2024
8924973
gh scraper: improve logging and scrape everything (beyond configured …
rithviknishad Nov 28, 2024
675f2e5
Show when page was built in footer
rithviknishad Nov 28, 2024
3ea55bc
fixes role filter not being cleared when reset state achieved
rithviknishad Nov 30, 2024
7b50909
Update project board script to treat contributors as first class citi…
rithviknishad Dec 3, 2024
27cf365
Remove InfoCard from being async unnecessarily; fixes #552
rithviknishad Dec 6, 2024
c0808b3
remove unnecessary async
rithviknishad Dec 6, 2024
be10189
skip using dotenv if not present
rithviknishad Dec 7, 2024
73f2f77
skip redundant loadOrgData being run in build
rithviknishad Dec 7, 2024
b48a785
simplify leaderboard discussion layout
rithviknishad Dec 7, 2024
91671ab
restructure discussion leaderboard component
rithviknishad Dec 7, 2024
4054327
try upgrading react types
rithviknishad Dec 7, 2024
98d3223
Bump cross-spawn from 7.0.3 to 7.0.6 (#548)
dependabot[bot] Dec 9, 2024
21a7beb
Bump micromatch from 4.0.7 to 4.0.8 (#535)
dependabot[bot] Dec 9, 2024
be46e0b
Gracefully handle PR events for potentially deleted contributor (#557)
rithviknishad Dec 12, 2024
91b070e
Fix: clipping out contributor card (#564)
AdityaJ2305 Dec 16, 2024
4294d41
Added Active status for leaderboard tab (#566)
AnveshNalimela Dec 16, 2024
62a0fc9
Fix: Message on contributor profile to update bio (#570)
AdityaJ2305 Dec 20, 2024
d39294f
Bump next from 14.2.10 to 14.2.15 (#567)
dependabot[bot] Dec 22, 2024
b46dbc6
Bump nanoid from 3.3.7 to 3.3.8 (#560)
dependabot[bot] Dec 22, 2024
e1e21f1
Fixed Overlap Footer with most helpful div in Discussions page (#571)
AnveshNalimela Dec 23, 2024
a253e30
changed little padding latest tag (#575)
AnveshNalimela Dec 24, 2024
ec6c008
ensure events are not appended for blacklisted users
rithviknishad Dec 24, 2024
a3b377b
improve bot detection logic
rithviknishad Dec 24, 2024
bb09761
Switch to shallow routing in leaderboard
rithviknishad Dec 25, 2024
c5b444b
Made the filter vsisible (#582)
AnveshNalimela Dec 30, 2024
97633fb
made badge model responsive
Mahendar0701 Dec 30, 2024
a9af0cb
Merge pull request #587 from Mahendar0701/badge-responsiveness
bodhish Dec 31, 2024
09578df
Add logo.png to repository
DonXavierdev Dec 31, 2024
bf70bba
Merge branch 'main' into issues/#588/fix-logo
DonXavierdev Dec 31, 2024
461bbd6
Merge pull request #592 from DonXavierdev/issues/#588/fix-logo
bodhish Dec 31, 2024
24118eb
add relative time for push event on feed page (#594)
rajku-dev Jan 1, 2025
07783d1
Incorrect Year according to Week Display on Leaderboard (#589)
abhimanyurajeesh Jan 2, 2025
0c63e62
PR Merge Icon corrected (#584)
Rishith25 Jan 7, 2025
f2850ae
Replace relative imports with absolute imports (#580)
AnveshNalimela Jan 7, 2025
ff28a60
FIXED: Leaderboard list responsivness (#562)
modamaan Jan 7, 2025
e87ea88
Added Functionality to learn more in contributors page (Redirection t…
AnveshNalimela Jan 7, 2025
46eda0a
Add: Identify First-Time PR Contributors for Last Week (#576)
JavidSumra Jan 7, 2025
ddbdd01
Fix Auto Width Shrink Issues in `discussions` and `releases` page (#600)
rajku-dev Jan 8, 2025
115bd25
support for PushEvent for core-team members
rajku-dev Jan 9, 2025
2f1e54f
grap `Commit` Type from GitHub API docs
rajku-dev Jan 9, 2025
ae0677a
enable tracking pushedCommits from forked repos
rajku-dev Jan 10, 2025
d7eaee9
Revert "enable tracking pushedCommits from forked repos"
rajku-dev Jan 10, 2025
ac161fe
exclude merge/cherry-pick commits
rajku-dev Jan 10, 2025
3cf8ad9
refine merge commit logic | change commit api link to github link
rajku-dev Jan 10, 2025
1db1d86
Merge branch 'main' into issue/373/support-forked-commits
rajku-dev Jan 11, 2025
c525e38
add stats tooltip | fix typo (#607)
rajku-dev Jan 15, 2025
89594a7
Merge branch 'main' into issue/373/support-forked-commits
rajku-dev Jan 15, 2025
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
41 changes: 28 additions & 13 deletions .env
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
## -- Organization Details -- ##
NEXT_PUBLIC_ORG_NAME=ohc.network
NEXT_PUBLIC_ORG_INFO=Open Healthcare Network is a free and open-source disaster management system that is used by National Health Mission, Government of India and various state governments for reimaging digital war rooms. The solution that students got an opportunity to intern with has supported 3.34Lac patient management and 1.29 Lac ambulance shiftings and is approved by the United Nations as a Digital Public Good.
NEXT_PUBLIC_ORG_LOGO=/logo.webp
NEXT_PUBLIC_GITHUB_ORG=coronasafe
NEXT_PUBLIC_SLACK_URL=https://slack.ohc.network
NEXT_PUBLIC_ORG_START_DATE=2020-03-08
NEXT_PUBLIC_ORG_NAME="ohc.network"
NEXT_PUBLIC_ORG_INFO="Open Healthcare Network is a free and open-source disaster management system that is used by National Health Mission, Government of India and various state governments for reimaging digital war rooms. The solution that students got an opportunity to intern with has supported 3.34Lac patient management and 1.29 Lac ambulance shiftings and is approved by the United Nations as a Digital Public Good."
NEXT_PUBLIC_ORG_LOGO="/logo.png"
NEXT_PUBLIC_ORG_URL= "https://ohc.network/"
NEXT_PUBLIC_GITHUB_ORG="ohcnetwork"
NEXT_PUBLIC_SLACK_URL="https://slack.ohc.network"
NEXT_PUBLIC_ORG_START_DATE="2020-03-08"
NEXT_PUBLIC_TIMEZONE="Asia/Kolkata"
NEXT_PUBLIC_GITHUB_URL="https://github.com/ohcnetwork"
NEXT_PUBLIC_LINKEDIN_URL="https://www.linkedin.com/company/ohcn/"
NEXT_PUBLIC_YOUTUBE_URL="https://www.youtube.com/@ohc.network"
NEXT_PUBLIC_CONTACT_EMAIL="info@ohc.network"

## -- SEO details -- ##
NEXT_PUBLIC_META_TITLE=Open Healthcare Network
NEXT_PUBLIC_META_IMG=/logo.webp
NEXT_PUBLIC_META_DESCRIPTION=OHC Network Leaderboard tracks the weekly progress of all coronasafe contributors.
NEXT_PUBLIC_META_URL=https://leaderboard.ohc.network
NEXT_PUBLIC_META_TITLE="Open Healthcare Network"
NEXT_PUBLIC_META_IMG="/logo.webp"
NEXT_PUBLIC_META_DESCRIPTION="ohc.network Leaderboard tracks the weekly contributions across different contributors working on projects in the organisation."
NEXT_PUBLIC_META_URL="https://contributors.ohc.network"

## -- Page Details -- ##
NEXT_PUBLIC_PAGE_TITLE=OHC Network Contributors
NEXT_PUBLIC_PAGE_TITLE="OHC Network Contributors"
NEXT_PUBLIC_CONTRIBUTORS_INFO=""
NEXT_PUBLIC_LEADERBOARD_DEFAULT_ROLES=core,intern,contributor
NEXT_PUBLIC_LEADERBOARD_DEFAULT_ROLES="core,intern,contributor"

## -- Data Source -- ##
DATA_SOURCE=https://github.com/coronasafe/leaderboard-data.git
DATA_SOURCE="https://github.com/ohcnetwork/leaderboard-data.git"
NEXT_PUBLIC_DATA_SOURCE="https://github.com/ohcnetwork/leaderboard-data.git"
NEXT_PUBLIC_FLAT_REPO_EXPLORER_URL="https://flatgithub.com/ohcnetwork/leaderboard-data"

## -- Slack -- ##
# SLACK_EOD_BOT_TOKEN=<Slack EOD Bot User's OAuth Token>
# SLACK_EOD_BOT_SIGNING_SECRET=<Slack EOD Bot App's Signing Secret>

## -- Features -- ##
NEXT_PUBLIC_FEATURES=Leaderboard,Contributors,Feed,Releases,Projects,Discussions
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dotenv
test -f .env.local && dotenv .env.local
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
}
]
},
"ignorePatterns": ["data"]
"ignorePatterns": ["data"]
}
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Suggest a new feature or improvement for the leaderboard Website
description: 'Do you have an idea or a suggestion and you want to share?'
labels: [feature request]
body:
- type: markdown
attributes:
value: |
You have an idea how to improve the site? That's awesome!
Before submitting, please have a look at the existing issues if there's already
something related to your suggestion.
- type: textarea
attributes:
label: 'Enter your suggestions in details:'
placeholder: |
1. What I expected to happen.
2. Your reason (if possible, images or videos are welcome).
3. What I plan to do (Optional but better).
validations:
required: true
50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/technical-visual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Report a Technical/Visual Issue on the leaderboard Website
description: 'Is something not working as expected? Did you encounter a glitch or a bug with the Website?'
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for reporting an issue you've found on the leaderboard website.
Please fill in the template below. If unsure about something, just do as best
as you're able. If you are reporting a visual glitch, it will be much easier
for us to fix it when you attach a screenshot as well.
- type: input
attributes:
label: 'URL:'
description: The URL of the page you are reporting an issue on.
placeholder: https://contributors.ohc.network/
validations:
required: true
- type: input
attributes:
label: 'Browser Name:'
description: What kind of browser are you using?
placeholder: Chrome
validations:
required: true
- type: input
attributes:
label: 'Browser Version:'
description: What version of browser are you using?
placeholder: '103.0.5060.134'
validations:
required: true
- type: input
attributes:
label: 'Operating System:'
description: What kind of operation system are you using
(Write it in full, with version number)?
placeholder: 'Windows 10, 21H2, 19044.1826'
validations:
required: true
- type: textarea
attributes:
label: 'How to reproduce the issue:'
placeholder: |
1. What I did.
2. What I expected to happen.
3. What I actually got.
4. If possible, images or videos are welcome.
validations:
required: true
48 changes: 40 additions & 8 deletions .github/workflows/scraper-dry-run.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Scraper Dry Run
name: Scraper Dry Run & Validate Schema

on:
workflow_dispatch:
pull_request:
paths:
- scraper/**
- tests/**
- schemas/**

jobs:
test-run-github-scraper:
Expand All @@ -12,23 +15,35 @@ jobs:
permissions:
issues: read
pull-requests: read
env:
DATA_REPO: ./
steps:
- uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
python-version: "3.10"
node-version: "20.14.0"

- run: rm data contributors && mkdir data contributors
- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pip install -r scraper/requirements.txt
run: pnpm install --frozen-lockfile
working-directory: scraper

- name: Build the project
run: pnpm build
working-directory: scraper

- name: Scrape data from GitHub
run: python scraper/src/github.py ${{ github.repository_owner }} data/github -l DEBUG
run: pnpm start ${{ github.repository_owner }} ../data/github
working-directory: scraper
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.SCRAPER_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
PROJECTS_BOARD_ID: PVT_kwDOA7JD8804yA

- run: mkdir contributors

- name: Generate markdown files for new contributors
run: node scripts/generateNewContributors.js
Expand All @@ -42,3 +57,20 @@ jobs:
path: |
data
contributors

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run Tests
run: pnpm test
53 changes: 39 additions & 14 deletions .github/workflows/scraper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ on:
slack-eod-channel:
required: false
type: string
leaderboard_ref:
required: false
type: string
default: main
description: A specific branch of scraper that is to be used.
projects-board-id:
required: false
type: string
description: Experimental; Works only with particular project board structure. Requires `read:project` scope for the SCRAPER_GITHUB_TOKEN. Disabled if not configured.
secrets:
SCRAPER_GITHUB_TOKEN:
required: false
description: Allows overriding the default GITHUB_TOKEN for providing scopes beyond what GITHUB_TOKEN can offer.
GIT_ACCESS_TOKEN:
required: true
SLACK_API_TOKEN:
required: false

Expand All @@ -13,42 +27,53 @@ jobs:
name: Scrape data from GitHub and Slack
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # This pulls the caller workflow's repo (eg: coronasafe/leaderboard-data)
- uses: actions/checkout@v4 # This pulls the caller workflow's repo (eg: ohcnetwork/leaderboard-data)
with:
token: ${{ secrets.GIT_ACCESS_TOKEN }}
- uses: actions/checkout@v4
with:
repository: coronasafe/leaderboard
repository: ohcnetwork/leaderboard
path: ./leaderboard
ref: ${{ inputs.leaderboard_ref }}
sparse-checkout: |
scraper
scripts

- name: setup python
uses: actions/setup-python@v3
- uses: actions/setup-node@v3
with:
node-version: "20.14.0"
- run: npm install -g pnpm

- run: pnpm install --frozen-lockfile
working-directory: scraper

- run: pnpm build
working-directory: scraper

- name: Scrape data from GitHub
run: pnpm start ${{ github.repository_owner }} ../../data/github
working-directory: scraper
env:
GITHUB_TOKEN: ${{ secrets.SCRAPER_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
PROJECTS_BOARD_ID: ${{ inputs.projects-board-id }}

- uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: pip install -r scraper/requirements.txt

- name: Scrape GitHub data
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: python scraper/src/github.py ${{ github.repository_owner }} data/github -l DEBUG
on_retry_command: git checkout .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Scrape EOD updates from Slack Channel
if: ${{ env.SLACK_API_TOKEN && env.SLACK_CHANNEL }}
run: python scraper/src/slack.py --lookback_days=2
continue-on-error: true
env:
SLACK_API_TOKEN: ${{ secrets.SLACK_API_TOKEN }}
SLACK_CHANNEL: ${{ inputs.slack-eod-channel }}

- run: mkdir -p contributors

- name: Generate markdown files for new contributors
run: node scripts/generateNewContributors.js
env:
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/slack_eod_reminder.yaml

This file was deleted.

9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
.pnp.js
bun.lockb
package-lock.json
pnpm-lock.yaml

# testing
/coverage
Expand Down Expand Up @@ -43,4 +42,10 @@ data-repo

# Package Lock
package-lock.json
yarn.lock
yarn.lock

# Files placed by data-repo

data/views/

.venv/
11 changes: 8 additions & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"semi": true,
"jsxSingleQuote": false,
"arrowParens": "always",
"tailwindFunctions": ["classNames"],
"plugins": ["prettier-plugin-tailwindcss"]
}
"tailwindFunctions": [
"classNames"
],
"plugins": [
"prettier-plugin-tailwindcss"
],
"endOfLine":"auto"
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Open Health Care Network
Copyright (c) 2024 Open Health Care Network

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading
Loading