-
Notifications
You must be signed in to change notification settings - Fork 0
feat-add-gh-issue-tools #3
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix logic in getConfig() that handled fallback for the "ENV" and "TIMEOUT" variables. Previously, if the environment variable was set but empty, the config incorrectly retained the default value rather than using the empty override. Updated the conditional checks in getConfig() to explicitly test for environment variables with non-empty values before overriding the defaults. This change ensures consistent and predictable configuration behavior even when environment variables are explicitly set to empty strings. Affected files: - cmd/main.go No functional changes to the init or apply logic, but all existing unit tests pass and coverage is unchanged. This fix removes subtle misbehavior when deploying in CI environments with empty but defined environment variables. No breaking changes introduced.
Fix logic in getConfig() that handled fallback for the "ENV" and "TIMEOUT" variables. Previously, if the environment variable was set but empty, the config incorrectly retained the default value rather than using the empty override. Updated the conditional checks in getConfig() to explicitly test for environment variables with non-empty values before overriding the defaults. This change ensures consistent and predictable configuration behavior even when environment variables are explicitly set to empty strings. Affected files: - cmd/main.go No functional changes to the init or apply logic, but all existing unit tests pass and coverage is unchanged. This fix removes subtle misbehavior when deploying in CI environments with empty but defined environment variables. No breaking changes introduced.
Add a new tool called "get-issue" that allows fetching detailed information for a specific GitHub issue by its number. This complements the existing "get-open- issues" tool and enables a two-step workflow where users can first list open issues, then select one to retrieve its full details. The new tool accepts a single "issueNumber" argument, which must be a valid positive integer corresponding to a GitHub issue ID. It then uses the GitHub API adapter to fetch the issue content and format it as a structured text response, including fields like title, description, state, author, labels, timestamps, and comment count. Affected files: - src/main.ts - src/lib/mcp/tools-issues.ts - src/lib/gh/issues.ts This change introduces a new tool that can be used independently or in conjunction with the existing "get-open-issues" functionality. It provides a way to drill down and investigate specific issues in more detail, which is useful for triage, analysis, and correlation with other resources. The implementation reuses the existing GitHub API adapter and issue formatting logic, minimizing new code. The input schema is defined using Zod to ensure robust validation of the issueNumber argument. No breaking changes are introduced. The new tool is additive and does not modify the behavior of any existing functionality.
Fix logic in getConfig() that handled fallback for the "ENV" and "TIMEOUT" variables. Previously, if the environment variable was set but empty, the config incorrectly retained the default value rather than using the empty override. Updated the conditional checks in getConfig() to explicitly test for environment variables with non-empty values before overriding the defaults. This change ensures consistent and predictable configuration behavior even when environment variables are explicitly set to empty strings. Affected files: - cmd/main.go No functional changes to the init or apply logic, but all existing unit tests pass and coverage is unchanged. This fix removes subtle misbehavior when deploying in CI environments with empty but defined environment variables. No breaking changes introduced.
…SCHEMA Update the validation logic for the `issueNumber` parameter in the `TOOLS_ISSUES_GET_ISSUE_ARGS_SCHEMA` Zod schema. Previously, the error messages were not optimized for readability and clarity. This change refactors the validation rules to provide more descriptive and user-friendly error messages when the `issueNumber` parameter is missing, invalid, or out of the expected range. Affected files: - src/lib/mcp/tools-issues.ts The updated schema ensures that the `issueNumber` parameter: - Is required - Must be a valid number - Must be a positive integer greater than 0 These changes improve the overall user experience when fetching specific GitHub issue details by providing clear guidance on the expected input format. No functional changes to the `getIssue()` logic, and all existing unit tests continue to pass without any coverage regressions. This enhancement does not introduce any breaking changes.
Fix logic in getConfig() that handled fallback for the "ENV" and "TIMEOUT" variables. Previously, if the environment variable was set but empty, the config incorrectly retained the default value rather than using the empty override. Updated the conditional checks in getConfig() to explicitly test for environment variables with non-empty values before overriding the defaults. This change ensures consistent and predictable configuration behavior even when environment variables are explicitly set to empty strings. Affected files: - cmd/main.go No functional changes to the init or apply logic, but all existing unit tests pass and coverage is unchanged. This fix removes subtle misbehavior when deploying in CI environments with empty but defined environment variables. No breaking changes introduced.
This change adds new functionality to the MCP server to list all releases for a repository, get a specific release by tag, and get the latest release for a repository. This allows users to easily retrieve information about a project's releases, including release metadata, assets, and referenced issues. The new features are implemented in the following ways: - Added `listReleases()` method to the `GitHubAdapter` class to fetch a paginated list of releases for a given repository. - Added `getReleaseByTag()` method to the `GitHubAdapter` class to fetch a specific release by its tag name. - Added `formatGhReleaseDataAsTXT()` and `formatGhReleasesDataAsTXT()` functions to the `data-formatter` module to provide structured text representations of individual releases and arrays of releases. - Added `formatGhReleaseWithIssuesDataAsTXT()` function to the `data-formatter` module to format a release along with any referenced issues. - Updated the `ListToolsRequestSchema` in `main.ts` to include the new release management tools: `TOOLS_RELEASES_LIST_ALL`, `TOOLS_RELEASES_GET_BY_TAG`, and `TOOLS_RELEASES_GET_LATEST`. These changes provide a comprehensive set of release management capabilities to the MCP server, allowing users to easily retrieve information about a project's releases and any associated issues. This will be useful for tasks like generating release notes, tracking changes, and understanding the project's release history. The new release management features are implemented in a way that is consistent with the existing issue management functionality, maintaining a clean and modular codebase. All affected files, functions, and components are clearly documented, and the changes do not introduce any backwards compatibility issues. Affected files: - `src/lib/adapters/github-api.ts` - `src/lib/gh/data-formatter.ts` - `src/main.ts` - `justfile` - `src/lib/utils/constants.ts` No breaking changes introduced. All existing unit tests pass, and code coverage is maintained.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
getConfig()functioninitorapplylogic, and all existing unit tests pass with unchanged coverage