Skip to content

GitHub event #1607

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

Merged
merged 4 commits into from
Jun 16, 2025
Merged

GitHub event #1607

merged 4 commits into from
Jun 16, 2025

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Jun 16, 2025


Summary of Changes

  • 🛠️ Refactored GitHub issue handling to automatically detect the issue number from the GitHub event payload, removing the need to pass the issue number as an explicit parameter.
  • 🔍 Enhanced the github.info() method to include additional event context, such as eventName and the full event payload, improving context awareness for scripts and actions.
  • 📝 Updated the issue bot script to use the new automatic issue detection and log repository info for debugging.
  • 🧹 Cleaned up the workflow file by removing the manual export of the issue number as an environment variable.
  • 🧪 Improved code consistency and variable naming in the sample GitHub script for clarity and maintainability.
  • ✅ Added logic to better support both issue and issue comment event types for robust issue number extraction.

AI-generated content by prd may be incorrect. Use reactions to eval.


  • Enhanced GitHub Connection Info: Added support for event-related details (eventName and event) in GithubConnectionInfo, enabling richer context about GitHub actions like issues, pull requests, and comments.
  • 🌟 Event Parsing Improvements: Introduced logic to extract issue numbers from event objects when applicable, especially for issue-related events (issue, issue_comment).
  • 🔄 Async Refactor: Updated githubFromEnv to an asynchronous function for handling tryReadJSON, ensuring better event file parsing.
  • 🔧 Improved Debugging: Enhanced debug logging in githubParseEnv and GitHubClient to reflect new data structure fields (event, eventName) for more transparent debugging.
  • 📋 Sample Code Adjustments: Refined variable naming for consistency (tsIssues, pullRequestReviewComments) and improved sample script readability.
  • Model Configuration: Updated sample script to use the echo model for testing.

AI-generated content by pr-describe may be incorrect. Use reactions to eval.

@pelikhan pelikhan changed the base branch from main to dev June 16, 2025 14:48
Copy link
Contributor

LGTM 🚀

AI-generated content by pr-review may be incorrect. Use reactions to eval.

Copy link
Contributor

Linter: variable-names

A test for new workflows or scripts should be considered. No annotations here, but adding tests is recommended.


Linter: stats

Metric Count
Total files modified 12
New files added 4
Total lines added Numerous
Total lines removed Numerous

Linter: no-fix-mes

No explicit fixMe comments detected. Nothing to flag.


Linter: grumpy-dev

  1. Modification in issue-bot.genai.mts:

    • Removing parameters for issue without explaining why? Back in my day, we'd document removals for posterity.
    • Commented-out github.getIssue suggests someone gave up midway. Either fix it or delete the dead code, not both.
  2. build.yml:

    • The removal of the github models name and its run command seems hasty. What testing is supposed to replace these steps? Hope we don’t find out at runtime.
  3. New Workflows (custom-action.yml, genai-issue-labeller.yml):

    • Oh joy, another workflow file, barely noticeable amidst this chaotic soup of half-manual YAML changes. Hopefully, not another case of copy-paste shenanigans.
  4. New Blog Drafts:

    • Two half-baked .md files? ‘Draft’ might as well mean, "Throw it in there without specifics." At least one looks like a placeholder for error-handling; that might eventually be useful.

Linter: diagrams

flowchart LR
    A[issue-bot.genai.mts] --> B[build.yml]
    A --> C[custom-action.yml]
    A --> D[genai-issue-bot.yml]
    A --> E[genai-issue-labeller.yml]
    A --> F[genai-issue-review.yml]
    A --> G[README.md]
    G --> H[astro.config.mjs]
    H --> I[package.json]
    I --> J[drafts/-error-handling-and-resilience-patterns-]
    I --> K[drafts/-from-idea-to-automation-]
Loading

Linter: description

The description of modifications in this PR (if any) doesn't match with the chaotic nature of the actual diff changes, as it alters too many unrelated files such as scripts, workflows, and docs. Revise the description to clarify intent.


Linter: comments

  1. No comments explaining significant removals in issue-bot.genai.mts.
  2. Workflow YAML lacks essential contextual comments for complicated steps. Comments like "This task does X" wouldn't hurt, you know?
  3. Blog drafts appear unpolished; recommend placeholder comments for authorship or WIP notes.

AI-generated content by linters may be incorrect. Use reactions to eval.

@pelikhan pelikhan merged commit 797bd4a into dev Jun 16, 2025
16 of 20 checks passed
@pelikhan pelikhan deleted the github_event branch June 17, 2025 16:04
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.

1 participant