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

Display draft HIPs for Jekyll build #1093

Merged
merged 13 commits into from
Jan 14, 2025
Merged

Display draft HIPs for Jekyll build #1093

merged 13 commits into from
Jan 14, 2025

Conversation

mgarbs
Copy link
Collaborator

@mgarbs mgarbs commented Jan 7, 2025

Description:
This PR adds a GitHub Action that automatically collects data about open pull requests containing HIPs drafts. Key features:

  • Runs every 6 hours on the main branch
  • Queries GitHub's GraphQL API to fetch open PRs from the repository
  • Stores PR data in _data/draft_hips.json for use by the site
  • Uses GitHub's built-in token for authentication
  • Includes error handling and automatic commit skipping when no changes detected

This automation replaces the current client-side GitHub API calls, which:

  • Removes the need for storing GitHub tokens in the site
  • Prevents rate limiting issues
  • Improves page load performance by using pre-fetched data

The workflow generates a JSON file containing PR metadata including:

  • PR number, title, and URL
  • Author information
  • File changes
  • Reference IDs needed for content fetching

Testing

  • Workflow has been tested in a fork environment
  • Successfully fetches all open PRs
  • Correctly identifies and processes markdown files
  • Properly commits and updates data file

@mgarbs mgarbs requested a review from a team as a code owner January 7, 2025 14:25
@mgarbs mgarbs requested a review from dalvizu January 7, 2025 14:25
Copy link

netlify bot commented Jan 7, 2025

Deploy Preview for hedera-hips ready!

Name Link
🔨 Latest commit d768cc8
🔍 Latest deploy log https://app.netlify.com/sites/hedera-hips/deploys/6785b096ad03c20008c402d5
😎 Deploy Preview https://deploy-preview-1093--hedera-hips.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

sergmetelin
sergmetelin previously approved these changes Jan 7, 2025
Copy link
Contributor

@sergmetelin sergmetelin left a comment

Choose a reason for hiding this comment

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

LGTM

@mgarbs mgarbs changed the title Pull draft hips Display draft HIPs for Jekyll build Jan 7, 2025
nathanklick
nathanklick previously approved these changes Jan 8, 2025
Copy link
Member

@nathanklick nathanklick left a comment

Choose a reason for hiding this comment

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

The only thing I would suggest is using SHA hashes for the actions steps instead of v3 etc.

This is a GHA best practice.

Signed-off-by: Michael Garber <michael.garber@swirldslabs.com>
@mgarbs mgarbs dismissed stale reviews from nathanklick and sergmetelin via e656f2a January 10, 2025 15:06
mgarbs and others added 8 commits January 13, 2025 18:15
Signed-off-by: Michael Garber <michael.garber@swirldslabs.com>
Co-authored-by: mgarbs <michael.garber@hashgraph.com>
Signed-off-by: mgarbs <michael.garber@hashgraph.com>
Signed-off-by: Michael Heinrichs <netopyr@users.noreply.github.com>
Signed-off-by: mgarbs <michael.garber@hashgraph.com>
Signed-off-by: mgarbs <michael.garber@hashgraph.com>
Signed-off-by: mgarbs <michael.garber@hashgraph.com>
Signed-off-by: mgarbs <michael.garber@hashgraph.com>
Signed-off-by: mgarbs <michael.garber@hashgraph.com>
@mgarbs mgarbs requested a review from rbarkerSL January 14, 2025 02:53
@mgarbs mgarbs merged commit 6fddbca into main Jan 14, 2025
12 of 13 checks passed
@mgarbs mgarbs deleted the pull-draft-hips branch January 14, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants