Commit Graph

118 Commits

Author SHA1 Message Date
de311344cd ci: pass repository version as build argument in workflow
All checks were successful
release-nightly / release-image (push) Successful in 2m13s
release / goreleaser (push) Successful in 48s
release / release-image (push) Successful in 1m15s
- Add build argument to pass the repository version to the workflow Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
v0.4.0
2025-09-15 15:09:16 +08:00
d7addd56c4 feat: read token from header in http/sse mode (#89)
All checks were successful
release / goreleaser (push) Successful in 46s
release / release-image (push) Successful in 1m14s
release-nightly / release-image (push) Successful in 2m59s
this PR introduces support for per-request authentication tokens in HTTP and SSE modes. The server now inspects incoming requests for an `Authorization: Bearer <token>` header. Previously, the server operated with a single, globally configured Gitea token. This change allows different clients to use their own tokens when communicating with the MCP server, enhancing security and flexibility. To support this, the Gitea API client initialization has been refactored: - The global singleton Gitea client has been removed. - A new `ClientFromContext` function creates a Gitea client on-demand, using a token from the request context if available, and falling back to the globally configured token otherwise. - All tool functions now retrieve the client from the context for each call. The README has also been updated to reflect the new configuration option. Update: #59 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-on: #89 Reviewed-by: hiifong <i@hiif.ong> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Darren Hoo <darren.hoo@gmail.com> Co-committed-by: Darren Hoo <darren.hoo@gmail.com>
2025-09-12 03:57:57 +00:00
dc3e120e97 Update operation/repo/file.go
All checks were successful
release / goreleaser (push) Successful in 41s
release-nightly / release-image (push) Successful in 1m4s
release / release-image (push) Successful in 2m37s
v0.3.2
2025-08-29 05:57:44 +00:00
f33b04a3df feat: added parameter 'organization' to tool 'create_repo' (#88)
All checks were successful
release-nightly / release-image (push) Successful in 1m6s
Using the Gitea-mcp server I was missing the ability to create repositories in other organizations. e.g.: * I was only able to create `https://gitea.domain.com/myuser/repo`  * I was not able to create `https://gitea.domain.com/organization/repo`  This feature was planned, implemented and compiled by Claude Code. I have no clue about Golang. I then took the resulting `gitea-mcp` file and sucessfully tested it on my self-hosted gitea instance: * Creating `https://gitea.domain.com/myuser/repo`  * Creating `https://gitea.domain.com/organization/repo`  Reviewed-on: #88 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: marcluer <gitea@marcluerssen.de> Co-committed-by: marcluer <gitea@marcluerssen.de>
2025-08-29 05:37:19 +00:00
ba07925969 refactor: refactor MCP tool registration and pagination handling (#86)
All checks were successful
release-nightly / release-image (push) Successful in 1m8s
- Add documentation for MCP tool constants and tool registration - Use configurable default values for pagination arguments in user organization queries - Introduce registerTools helper to streamline MCP tool registration - Refactor pagination argument parsing into a reusable getIntArg function - Add descriptive logging for tool handler execution - Improve code organization for defining and registering MCP tools Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #86 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-08-23 04:31:57 +00:00
5c2ff6dcb2 feat: Add support for managing repository and issue labels (#83)
All checks were successful
release-nightly / release-image (push) Successful in 57s
release / goreleaser (push) Successful in 1m23s
release / release-image (push) Successful in 3m39s
## **What:** Adds full label management capabilities to the Gitea CLI for both repositories and issues. Users can now create, edit, delete, list, and assign labels without leaving the terminal. ## **Why:** Labels are a core part of keeping repositories and issues organized. Previously, `gitea-mcp` lacked CLI support for label management, forcing users to rely on the web UI or custom scripts. This update closes that gap, enabling smoother automation and more efficient workflows. ## **How:** Implemented new `label` subcommands: * **Repository Labels:** * `list_repo_labels` — Lists all labels for a repository. * `get_repo_label` — Retrieves a label by ID. * `create_repo_label` — Creates a new label. * `edit_repo_label` — Updates an existing label. * `delete_repo_label` — Removes a label. * **Issue Labels:** * `add_issue_labels` — Adds one or more labels to an issue. * `replace_issue_labels` — Replaces all labels on an issue. * `clear_issue_labels` — Removes all labels from an issue. * `remove_issue_label` — Removes a single label from an issue. ## **Testing:** User acceptance testing was performed across all new commands, confirming correct behavior for creating, editing, deleting, listing, and applying labels. Also looped through 20 issues in roo Orchestrator mode and assigned different labels to each without issue. Reviewed-on: #83 Reviewed-by: hiifong <i@hiif.ong> Co-authored-by: meestark <meestark@meestark.net> Co-committed-by: meestark <meestark@meestark.net>
v0.3.1
2025-08-11 07:33:07 +00:00
feaedaf604 fix: pass body through in create_release (#82)
All checks were successful
release-nightly / release-image (push) Successful in 2m43s
### What Ensure `create_release` accepts and forwards a `body` so release notes are created as provided. ### Why Previously, the `body` parameter wasn’t threaded through, resulting in empty release notes even when a body was supplied. ### How - Add `body` parameter to the function signature - Thread `body` through handler/service to the API call - Light refactor for clarity; no breaking changes ### Testing - Manual: created a release with a non-empty body and confirmed it appears in the UI and in the releases API response ### Links Fixes gitea/gitea-mcp#81 Reviewed-on: #82 Reviewed-by: hiifong <i@hiif.ong> Co-authored-by: meestark <meestark@meestark.net> Co-committed-by: meestark <meestark@meestark.net>
2025-08-11 01:07:52 +00:00
a601d6b698 Remove last empty line in GetFileContentFn (#80)
All checks were successful
release-nightly / release-image (push) Successful in 1m21s
Normally, each file should be end with a blank line, but git does not consider it as a new line, so we should not return it to llm, or it may generate wrong information when editing the existing file. Reviewed-on: #80 Reviewed-by: hiifong <i@hiif.ong> Co-authored-by: yp05327 <576951401@qq.com> Co-committed-by: yp05327 <576951401@qq.com>
2025-08-07 02:18:01 +00:00
62cb6e7830 Use no session id (#75)
All checks were successful
release-nightly / release-image (push) Successful in 1m3s
Reviewed-on: #75 Reviewed-by: hiifong <i@hiif.ong> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-07-30 01:01:55 +00:00
9fff996294 Add withLines option to get_file_content (#76)
All checks were successful
release-nightly / release-image (push) Successful in 1m9s
Reviewed-on: #76 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: yp05327 <576951401@qq.com> Co-committed-by: yp05327 <576951401@qq.com>
2025-07-29 18:29:29 +00:00
4c3f5149d8 feat: set custom user agent for Gitea client using server version (#74)
All checks were successful
release-nightly / release-image (push) Successful in 1m1s
- Import the fmt package to enable string formatting - Set a custom user agent for the Gitea client using the current server version Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #74 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-07-27 10:31:48 +00:00
eb6b5a8f92 chore: upgrade Go dependencies to latest stable versions (#73)
All checks were successful
release-nightly / release-image (push) Successful in 1m4s
- Bump github.com/mark3labs/mcp-go dependency to v0.35.0 - Update github.com/spf13/cast to v1.9.2 - Upgrade golang.org/x/crypto to v0.40.0 - Upgrade golang.org/x/sys to v0.34.0 Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #73 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-07-27 06:23:38 +00:00
1d9bdb5b44 fix bug
All checks were successful
release-nightly / release-image (push) Successful in 59s
2025-07-21 09:04:37 +00:00
093cddbcb6 feat: configure HTTP server heartbeat interval to 30 seconds
All checks were successful
release-nightly / release-image (push) Successful in 2m49s
- Import the time package to support time-based configuration - Set the HTTP server's heartbeat interval to 30 seconds using a new option in its initialization Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-07-18 10:12:26 +08:00
5dbfe21127 refactor: refactor logging and server setup for clarity and structure (#64)
All checks were successful
release-nightly / release-image (push) Successful in 58s
- Refactor server initialization calls in Run to use multiline construction style and explicitly pass options in HTTP mode - Fix logic in Default to prevent redundant logger initialization - Remove unused Logger function and introduce a Logger struct with Infof and Errorf methods for structured logging - Add a New function for creating instances of the Logger struct Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #64 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-06-22 10:27:09 +00:00
b85a523983 Bump go-mcp version to 0.32.0 to mitigate Claude desktop connectivity issue (#63)
All checks were successful
release-nightly / release-image (push) Successful in 1m1s
Reviewed-on: #63 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: Bo-Yi Wu (吳柏毅) <appleboy.tw@gmail.com> Co-authored-by: Alex Kirhenshtein <alk@netxms.org> Co-committed-by: Alex Kirhenshtein <alk@netxms.org>
2025-06-21 03:34:17 +00:00
da08718e24 style: refactor code formatting for clarity and conciseness
All checks were successful
release-nightly / release-image (push) Successful in 1m10s
release / goreleaser (push) Successful in 1m8s
release / release-image (push) Successful in 3m24s
- Remove extra blank lines for cleaner code formatting - Combine variable declaration of GetGiteaMCPServerVersionTool into a single line for clarity Signed-off-by: appleboy <appleboy.tw@gmail.com>
v0.3.0
2025-06-15 19:44:28 +08:00
44ea8969f4 refactor: migrate environment config from GITEA_MODE to MCP_MODE (#62)
All checks were successful
release-nightly / release-image (push) Successful in 1m9s
- Remove the GITEA_MODE environment variable from the Dockerfile - Switch environment variable usage from GITEA_MODE to MCP_MODE in the Go command initialization fix #55 Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-on: #62 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-06-15 11:40:59 +00:00
94aa8dc572 fix: harden log directory creation and path resolution (#61)
All checks were successful
release-nightly / release-image (push) Successful in 2m48s
- Ensure the log directory is created with secure permissions, falling back to the temp directory if creation fails - Update log file path to use the resolved log directory fix #58 Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Reviewed-on: #61 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-06-13 19:30:14 +00:00
05194ffc1c chore: add live reload config and update editor and git settings (#57)
All checks were successful
release-nightly / release-image (push) Successful in 1m4s
- Add .air.toml configuration file for Air live reloading with specific build and file watch settings - Ignore the tmp directory in .gitignore - Rename the gitea server configuration to gitea-mcp-stdio in the VSCode config and add separate configuration for gitea-mcp-http Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #57 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-06-08 03:55:10 +00:00
5c329129f8 docs: standardize server configuration naming in documentation (#56)
All checks were successful
release-nightly / release-image (push) Successful in 3m23s
- Rename the example "github" server configuration to "gitea-mcp" in all README files Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #56 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-06-08 02:51:32 +00:00
52ccf92761 Add edit issue comment and list issue comments tools (#48)
All checks were successful
release-nightly / release-image (push) Successful in 1m3s
- Add tools: - `edit_issue_comment` for edit issue comments - `get_issue_comments_by_index` for getting issue's comment by its index Co-authored-by: hiifong <i@hiif.ong> Reviewed-on: #48 Co-authored-by: natchanonnn <natchanon.w@loolootech.com> Co-committed-by: natchanonnn <natchanon.w@loolootech.com>
2025-06-03 10:24:50 +00:00
ZRE
061ea86b0b feat: add GetDirContent tool for retrieving directory entries (#53)
All checks were successful
release-nightly / release-image (push) Successful in 1m5s
### 🚀 What's Changed This PR introduces a new MCP tool `get_dir_content` that allows users to retrieve a list of entries (files and subdirectories) from a specified directory in a Gitea repository. ###  Features Added - **New Tool**: `GetDirContent` tool for directory listing functionality - **Tool Registration**: Properly registered as a read operation in the MCP server - **Parameter Validation**: Comprehensive input validation for required parameters - **Error Handling**: Robust error handling with descriptive error messages ### 🔧 Technical Details - **Tool Name**: `get_dir_content` - **Required Parameters**: - `owner`: Repository owner - `repo`: Repository name - `ref`: Branch, tag, or commit reference - `filePath`: Directory path to list ### 📁 Files Modified - file.go: Added tool definition, registration, and handler function ### 🎯 Use Cases This tool enables users to: - Browse repository directory structures - List files and folders in specific directories - Navigate repository contents programmatically - Support file management workflows in MCP clients Reviewed-on: #53 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: ZRE <chy853@gmail.com> Co-committed-by: ZRE <chy853@gmail.com>
2025-05-31 19:37:11 +00:00
f14b60fe56 build: update base image to distroless/static-debian12:nonroot (#52)
All checks were successful
release-nightly / release-image (push) Successful in 1m4s
- Update base image from distroless/static-debian11:nonroot to distroless/static-debian12:nonroot Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #52 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-05-30 07:47:50 +00:00
94782a85b6 build: streamline container configuration and metadata (#51)
All checks were successful
release-nightly / release-image (push) Successful in 1m2s
- Remove the container healthcheck definition - Delete the image authors label from the build Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #51 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-05-30 06:47:28 +00:00
e94dd26b30 build: refactor Dockerfile for security, performance, and flexibility (#50)
All checks were successful
release-nightly / release-image (push) Successful in 1m17s
- Switch build base image to Alpine and set platform dynamically - Use distroless nonroot image for final stage to enhance security - Add build arguments for VERSION, TARGETOS, and TARGETARCH with defaults - Cache Go module and build dependencies to improve build performance - Remove manual installation of ca-certificates and user creation (handled by base image) - Set nonroot user for running the application - Add healthcheck for the built binary - Add OCI-compliant author and version labels Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #50 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-05-30 04:58:24 +00:00
da49bdeb96 feat: integrate server recovery middleware into MCP server initialization (#49)
All checks were successful
release-nightly / release-image (push) Successful in 3m17s
- Add server recovery middleware to the MCP server initialization Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #49 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-05-30 04:21:12 +00:00
3f61299f72 refactor: refactor HTTP client setup to enhance configuration flexibility (#47)
All checks were successful
release-nightly / release-image (push) Successful in 3m7s
- Refactor HTTP client initialization to always create a custom http.Client - Move TLS config modification into the default HTTP client when insecure flag is set - Ensure the HTTP client is always included in client options Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #47 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-05-27 12:52:19 +00:00
5308fbfb2b docs: add Table of Contents to all README translations (#46)
All checks were successful
release / goreleaser (push) Successful in 2m1s
release-nightly / release-image (push) Successful in 4m18s
release / release-image (push) Successful in 4m43s
- Add a Table of Contents section to the README files in English, Simplified Chinese, and Traditional Chinese for improved navigation. Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #46 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
v0.2.0
2025-05-27 12:32:27 +00:00
a7061f9b64 fix: make API bool parameters in search_repos and list_releases optional (#40) (#44)
All checks were successful
release-nightly / release-image (push) Successful in 3m2s
Fix #40 Left the `mcp.DefaultBool(false)` for `is_draft` and `is_pre_release` in `list_releases`, because I guess they are default, but it's up to the client whether to set them or not. 11e04b5b8d/operation/repo/release.go (L67-L68) Reviewed-on: #44 Reviewed-by: Bo-Yi Wu (吳柏毅) <appleboy.tw@gmail.com> Co-authored-by: Hubert Wawrzyńczyk <hubert@fit-it.pl> Co-committed-by: Hubert Wawrzyńczyk <hubert@fit-it.pl>
2025-05-27 12:20:47 +00:00
f25cc0de8c feat: add HTTP server mode with updated docs and localization (#45)
All checks were successful
release-nightly / release-image (push) Successful in 3m4s
- Update download instructions for clarity and consistency in all README files - Add example configuration for HTTP mode to all README files - Expand transport type support to include "http" in command-line flags and documentation - Implement HTTP server mode in the application entrypoint - Update log output behavior to include "http" mode alongside "sse" for stdout logging - Refine Chinese README translations for greater accuracy and localization Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: #45 Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-05-27 12:17:37 +00:00
417ef26da0 build: add VS Code server config and enable versioning of settings (#43)
All checks were successful
release-nightly / release-image (push) Successful in 3m7s
- Remove .vscode directory from .gitignore to allow versioning of VS Code settings - Add a VS Code server configuration file with prompts for Gitea host, access token, and insecure connection option - Configure a stdio-based server launch for gitea-mcp with relevant environment variables Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Reviewed-on: #43 Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-05-27 04:15:22 +00:00
34ca5d45db refactor(args): request argument access and update dependencies (#42)
All checks were successful
release-nightly / release-image (push) Successful in 3m4s
- Update dependencies to newer versions in go.mod - Refactor all request argument accesses to use req.GetArguments() instead of direct access to req.Params.Arguments - Change variable declaration for ListRepoCommitsTool from a grouped var block to a single var statement for consistency Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Reviewed-on: #42 Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-05-26 06:10:10 +00:00
796fd4682d docs: document get_user_orgs tool in Chinese guides (#41)
Some checks are pending
release-nightly / release-image (push) Waiting to run
- Add get_user_orgs tool to the list of supported tools in both Simplified and Traditional Chinese documentation Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Reviewed-on: #41 Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-05-26 06:01:59 +00:00
95c036bf3a docker sse (#37)
All checks were successful
release / goreleaser (push) Successful in 44s
release / release-image (push) Successful in 3m37s
release-nightly / release-image (push) Successful in 2m49s
Reviewed-on: #37 Co-authored-by: hiifong <f@ilo.nz> Co-committed-by: hiifong <f@ilo.nz>
v0.1.9
2025-04-20 09:14:14 +00:00
70b9ac5b80 Support read only mode (#36)
All checks were successful
release-nightly / release-image (push) Successful in 2m51s
Fix: #35 Reviewed-on: #36 Co-authored-by: hiifong <f@ilo.nz> Co-committed-by: hiifong <f@ilo.nz>
2025-04-20 09:09:29 +00:00
59e699aac7 Add get_user_orgs tool (#34)
All checks were successful
release-nightly / release-image (push) Successful in 3m51s
Fix #33 Reviewed-on: #34 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-committed-by: techknowlogick <techknowlogick@gitea.com>
2025-04-18 01:30:44 +00:00
26c50d53bd Add gitlens to vscode extentions (#31)
All checks were successful
release-nightly / release-image (push) Successful in 2m50s
Co-authored-by: hiifong <i@hiif.ong> Reviewed-on: #31 Reviewed-by: hiifong <i@hiif.ong> Co-authored-by: yp05327 <576951401@qq.com> Co-committed-by: yp05327 <576951401@qq.com>
2025-04-11 11:54:12 +00:00
7bfc596a58 fix debug mode default value (#29)
All checks were successful
release-nightly / release-image (push) Successful in 2m51s
Reviewed-on: #29
2025-04-11 10:01:59 +00:00
966d617670 Add EditIssue (#30)
Some checks failed
release-nightly / release-image (push) Has been cancelled
Reviewed-on: #30 Reviewed-by: hiifong <i@hiif.ong> Co-authored-by: yp05327 <576951401@qq.com> Co-committed-by: yp05327 <576951401@qq.com>
2025-04-11 10:01:41 +00:00
af27b685d4 feat: Add debug (#28)
Some checks are pending
release-nightly / release-image (push) Waiting to run
Reviewed-on: #28 Reviewed-by: yp05327 <576951401@qq.com> Co-authored-by: hiifong <i@hiif.ong> Co-committed-by: hiifong <i@hiif.ong>
2025-04-11 06:48:01 +00:00
fac6e1d8d1 Include error info in some functions (#27)
All checks were successful
release-nightly / release-image (push) Successful in 3m19s
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-on: #27 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: yp05327 <576951401@qq.com> Co-committed-by: yp05327 <576951401@qq.com>
2025-04-11 06:06:16 +00:00
f656c92cda Encode content to base64 in UpdateFileFn (#26)
All checks were successful
release-nightly / release-image (push) Successful in 2m53s
Same to CreateFileFn Reviewed-on: #26 Reviewed-by: hiifong <i@hiif.ong> Co-authored-by: yp05327 <576951401@qq.com> Co-committed-by: yp05327 <576951401@qq.com>
2025-04-11 05:03:36 +00:00
af0975d93f Add release and tags related funcions (#25)
All checks were successful
release-nightly / release-image (push) Successful in 2m54s
Reviewed-on: #25 Reviewed-by: hiifong Mr <i@hiif.ong> Co-authored-by: yp05327 <576951401@qq.com> Co-committed-by: yp05327 <576951401@qq.com>
2025-04-10 08:22:09 +00:00
001383142f fix typo
All checks were successful
release / goreleaser (push) Successful in 27s
release-nightly / release-image (push) Successful in 3m10s
release / release-image (push) Successful in 3m10s
v0.1.8
2025-04-08 14:01:14 +00:00
b35919989f ci: update CI environment variables for better token management
All checks were successful
release / goreleaser (push) Successful in 55s
release-nightly / release-image (push) Successful in 4m47s
release / release-image (push) Successful in 4m43s
- Replace `GITHUB_TOKEN` with `GITEA_TOKEN` and add `GORELEASER_FORCE_TOKEN` environment variable Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-04-08 21:41:04 +08:00
d0225c4c24 build: enhance build process and release configuration
Some checks failed
release / goreleaser (push) Failing after 11s
release-nightly / release-image (push) Has been cancelled
release / release-image (push) Successful in 3m31s
- Add build flags and ldflags for Go builds - Add Gitea URLs and force token configuration for release Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-04-08 21:39:21 +08:00
6993bb2b5d ci: integrate GoReleaser for streamlined release management
Some checks failed
release / goreleaser (push) Failing after 44s
release-nightly / release-image (push) Has been cancelled
release / release-image (push) Successful in 3m1s
- Rename job from `release` to `goreleaser` in `release-tag.yml` - Change the tag pattern from `' * '` to `" * "` in `release-tag.yml` - Update job steps to better describe their actions in `release-tag.yml` - Replace build steps with GoReleaser action steps in `release-tag.yml` - Add configuration file `.goreleaser.yaml` for GoReleaser - Include hooks, builds, archives, changelog sorting, and release footer in `.goreleaser.yaml` Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-04-08 21:34:03 +08:00
f1b4a208a7 fix(cmd): ensure GITEA_HOST can be read (#23)
Some checks failed
release-nightly / release-image (push) Has been cancelled
release / release-image (push) Has been cancelled
release / release (push) Has been cancelled
## Why With the following configuration: ```bash docker run -i --rm -e GITEA_HOST=<gitea_host> -e GITEA_ACCESS_TOKEN=<gitea_access_token_for_host> docker.gitea.com/gitea-mcp-server:latest ``` after mcp-client calling a tool, the gitea client will encounter the following fatal error: ``` FATAL gitea/gitea.go:47 create gitea client err: user does not exist [uid: 0, name: ] gitea.com/gitea/gitea-mcp/pkg/gitea.Client.func1 /app/pkg/gitea/gitea.go:47 sync.(*Once).doSlow /usr/local/go/src/sync/once.go:78 sync.(*Once).Do /usr/local/go/src/sync/once.go:69 gitea.com/gitea/gitea-mcp/pkg/gitea.Client /app/pkg/gitea/gitea.go:21 gitea.com/gitea/gitea-mcp/operation/search.SearchReposFn /app/operation/search/search.go:161 github.com/mark3labs/mcp-go/server.(*MCPServer).handleToolCall /go/pkg/mod/github.com/mark3labs/mcp-go@v0.18.0/server/server.go:717 github.com/mark3labs/mcp-go/server.(*MCPServer).HandleMessage /go/pkg/mod/github.com/mark3labs/mcp-go@v0.18.0/server/request_handler.go:264 github.com/mark3labs/mcp-go/server.(*StdioServer).processMessage /go/pkg/mod/github.com/mark3labs/mcp-go@v0.18.0/server/stdio.go:228 github.com/mark3labs/mcp-go/server.(*StdioServer).processInputStream /go/pkg/mod/github.com/mark3labs/mcp-go@v0.18.0/server/stdio.go:143 github.com/mark3labs/mcp-go/server.(*StdioServer).Listen /go/pkg/mod/github.com/mark3labs/mcp-go@v0.18.0/server/stdio.go:209 github.com/mark3labs/mcp-go/server.ServeStdio /go/pkg/mod/github.com/mark3labs/mcp-go@v0.18.0/server/stdio.go:282 gitea.com/gitea/gitea-mcp/operation.Run /app/operation/operation.go:48 gitea.com/gitea/gitea-mcp/cmd.Execute /app/cmd/cmd.go:119 main.main /app/main.go:12 runtime.main /usr/local/go/src/runtime/proc.go:283 ``` Turns out the root cause was because the `GITEA_HOST` environment variable wasn't overriding the default flag value, resulting in mismatch of host and access token. The if statement won't be entered 7cfa1fa218/cmd/cmd.go (L74-L77) Due to `host` could never be evaluated as an empty string from the default value `"http://gitea.com"` 7cfa1fa218/cmd/cmd.go (L35-L40) Unless user specify `gitea-mcp ... --host <empty_string> ...` with environment `GITEA_HOST=<non_empty_string>` at the same time, which is very unlikely IMHO. ## How - Set `host` flag default value from `GITEA_HOST` environment variable value - Remove possible dead code if-statement Co-authored-by: hiifong <i@hiif.ong> Reviewed-on: #23 Reviewed-by: hiifong <i@hiif.ong> Co-authored-by: Flynn Hou <flynnhou7@gmail.com> Co-committed-by: Flynn Hou <flynnhou7@gmail.com>
2025-04-08 13:08:50 +00:00
d76f02a234 chore: refactor Docker configuration and update exclusion rules
Some checks failed
release-nightly / release-image (push) Has been cancelled
- Add a `.dockerignore` file for Docker configuration - Ignore git-related files and directories - Exclude Dockerfile and `.dockerignore` - Ignore build artifacts including binaries and shared libraries - Add rules for Go-specific files and directories - Exclude testing-related files and folders - Ignore files from IDEs and editors - Exclude OS-specific and temporary files - Ignore documentation files and directories - Add development tools configuration files - Exclude debug files and directories Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-04-08 21:06:52 +08:00