Skip to content

Conversation

@mincong-h
Copy link
Contributor

It's very error-prone, especially when the branch name contains a commit hash, which has one or multiple numbers.

@vercel
Copy link

vercel bot commented Jun 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
demo-github-server ⬜️ Ignored (Inspect) Visit Preview Jun 20, 2025 11:52am

@vertesia-code-review
Copy link

vertesia-code-review bot commented Jun 19, 2025

Changes

This pull request updates the github-agent application to align with version 0.50.1 of the Vertesia suite of packages, specifically @vertesia/client and @vertesia/common. The updates include removing the parsing of issue IDs directly from Git branches, focusing instead on parsing them from the pull request body, and updating the Vertesia CLI version in the test workflow.

Here is a breakdown of the changes:

Path Description
.github/workflows/test.yaml Updates the Vertesia CLI version to 0.50.1 in the test workflow and adds a version check.
.gitignore Adds .turbo to the .gitignore file.
apps/github-agent/package.json Downgrades @vertesia/client and @vertesia/common dependencies to version 0.50.1.
apps/github-agent/src/workflows/parser.ts Removes the parseIssueIdFromBranch function, which parsed issue IDs from Git branches. The logic for extracting the issue id from the branch name has been removed.
apps/github-agent/src/workflows/parser.test.ts Removes test case for parseIssueIdFromBranch since it's been removed.
apps/github-agent/src/workflows/review-pull-request.ts Removes the branch attribute from parseIssuesFromPullRequest function in loadGithubIssues function call.
pnpm-lock.yaml Updates the dependencies in pnpm-lock.yaml to align with version 0.50.1 of the Vertesia packages. The eventsource and @vertesia/api-fetch-client versions were downgraded as well.

Purpose

The pull request aims to remove the parsing of issue numbers from branch names. The primary motivation is that this parsing process is highly error-prone. Specifically, the presence of commit hashes (which contain numbers) within branch names can lead to incorrect identification of issue numbers.

The change is important because it addresses a flaw in the existing system where the issue number is parsed from the branch name. This parsing is unreliable, particularly when commit hashes are included in the branch naming convention. Removing this functionality will improve the stability and predictability of the system, preventing misidentification of issues.

Related issues: N/A

Code Review

You can start a code review by adding a comment: "Vertesia, please review".

Note that the motivation and context are rated as very clear (5/5). The agent has a very good understanding of the purpose of the pull request.

@mincong-h mincong-h merged commit dfea2d8 into main Jun 20, 2025
7 checks passed
@mincong-h mincong-h deleted the rm-parse-branch branch June 20, 2025 11:58
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.

2 participants