-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Import from ethereum events sheet #12463
Conversation
WalkthroughThese changes enhance the project's event management by enabling the import of community events from Ethereum. A new script, Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Review Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files ignored due to path filters (1)
package.json
is excluded by:!**/*.json
Files selected for processing (2)
- src/scripts/events-import.ts (1 hunks)
- src/scripts/events/ethereum-events-import.ts (1 hunks)
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.
Review Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files ignored due to path filters (1)
src/data/community-events.json
is excluded by:!**/*.json
Files selected for processing (5)
- .github/workflows/import-community-events.yml (1 hunks)
- src/components/UpcomingEventsList.tsx (2 hunks)
- src/lib/types.ts (1 hunks)
- src/scripts/events-import.ts (1 hunks)
- src/scripts/events/ethereum-events-import.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/scripts/events/ethereum-events-import.ts
Additional comments: 9
.github/workflows/import-community-events.yml (4)
- 5-5: The cron schedule is set correctly to run every Sunday at midnight. This is a good practice for periodic tasks that don't require immediate updates.
- 12-12: Using
actions/checkout@master
is generally fine, but consider pinning to a specific version or commit hash for more predictable builds.- 16-19: The use of environment variables for sensitive information like
GOOGLE_API_KEY
is a good practice for security.- 20-23: Automatically committing changes with
EndBug/add-and-commit@v9
is efficient. Ensure that thedefault_author: github_actions
aligns with your project's contribution guidelines.src/scripts/events-import.ts (1)
- 10-32: The overall structure of the script is clear and follows good practices for asynchronous operations with an immediately invoked function expression (IIFE).
src/components/UpcomingEventsList.tsx (3)
- 14-14: Importing
community-events.json
directly is a straightforward way to use static data in a React component.- 40-40: Casting
communityEvents
asCommunityConference[]
is necessary due to the dynamic nature of JSON imports in TypeScript.- 11-17: > 📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]
Consider using React's lazy loading for components that are not immediately visible to improve initial load times. This is especially useful for components like event lists that can grow over time.
src/lib/types.ts (1)
- 493-493: Adding the
imageUrl
field to theCommunityConference
type is consistent with the PR's objective of enhancing event data. Ensure all components using this type are updated accordingly.
Ready for review |
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (1)
src/data/community-events.json
is excluded by:!**/*.json
Files selected for processing (3)
- .github/workflows/import-community-events.yml (1 hunks)
- src/scripts/events-import.ts (1 hunks)
- src/scripts/events/ethereum-events-import.ts (1 hunks)
Files skipped from review as they are similar to previous changes (3)
- .github/workflows/import-community-events.yml
- src/scripts/events-import.ts
- src/scripts/events/ethereum-events-import.ts
This looks great from my perspective. I will follow up with another PR with the design change, but we can push this to production from my side. @pettinarip or @wackerow : I might need some of your eyes here. Thank you, @wslyvh, for this!!!! |
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.
LGTM @wslyvh 💪🏼 nice job!
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.
Nice! Thanks @wslyvh, this looks great! Just gonna push one small commit to remove the guard for a hard-coded variable and then pull this in. Thanks again!
(On the side, we need to double-check that our GOOGLE_API_KEY token has the appropriate permissions and update if not.)
hard-coded, always available
Congrats, your important contribution to this open-source project has earned you a GitPOAP! Be sure to join the Ethereum.org discord if you are interested in contributing further to the project or have any questions for the team. GitPOAP: 2024 Ethereum.org Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
@all-contributors please add @wslyvh for infra |
I've put up a pull request to add @wslyvh! 🎉 |
Adding an importer to fetch community events from the Ethereum Events sheet.
https://docs.google.com/spreadsheets/d/1NEu_FCc1hnGAuRgPmbXXpf0h2lCrCOlMKbbFEqgkVDQ/
Description
It's hard to maintain an up to date overview of community events. This PR adds an importer from a known Google Sheet to help populate the community events page. The idea is that you can add multiple importers, while also keeping your own, internal JSON file where people can suggest to add their own events, so you're not just relying on the sheet for populating the events overview.
TODOs
Summary by CodeRabbit
Summary by CodeRabbit