-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix: Migrate Achievements plugin to Projects V2 API and improve Habits plugin error handling #1769
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
base: master
Are you sure you want to change the base?
Conversation
|
I've been pretty busy IRL recently so I haven't had the chance to pull in all these PRs hanging around into @gh-metrics, but if you'd be willing to go file it over there I'll try to find some time pull it in next week ❤️ |
- Use original lowlighter/metrics Docker image as base - Only copy changed GraphQL/JS files (4 files) - Avoids rebuilding Chrome, Node modules, dependencies - Much faster builds for code-only changes
- Filter out null/undefined commits from payload.commits - Add safety check for missing author property - Prevents 'Cannot destructure property author of undefined' error
|
Request pull |
|
Any update on this? 🙂 |
|
meanwhile you could switch to this PR branch (fork of this repo):
https://github.com/dkhokhlov/dkhokhlov/blob/main/.github/workflows/actions.yml#L21 |
The achievements plugin uses the deprecated Projects Classic API which GitHub removed in May 2024. This causes a GraphQL error: "Projects (classic) is being deprecated in favor of the new Projects experience" The plugin code queries the Projects Classic API even before filtering out ignored achievements like 'organizer', so there's no workaround. Open issue: lowlighter/metrics#1706 Fix in progress: lowlighter/metrics#1769 The step is commented out with a TODO to re-enable once PR #1769 is merged. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fix: Migrate Achievements plugin to Projects V2 API and improve Habits plugin error handling
Problem
projectsfield which is no longer available.Solution
Achievements Plugin (Projects V2 Migration)
achievements.graphql,organizations.graphql) to useprojectsV2instead of deprecatedprojectsfieldusers.mjs,organizations.mjs) to referenceprojectsV2.totalCountandprojectsV2.nodesHabits Plugin (Defensive Programming)
commit != null && typeof commit === 'object'commit?.author)Docker Build Optimization (Forks)
ghcr.io/lowlighter/metrics:v3.35-beta)Testing
Fixes #1706, #1739