Skip to content

Conversation

@ryotsukuda333
Copy link

Summary

Add support for updating existing wiki pages through the Backlog API, implementing the missing update_wiki functionality.

Changes

  • ✅ Add updateWiki.ts tool implementation using backlog.patchWiki()
  • ✅ Add comprehensive test suite (updateWiki.test.ts) with 7 test cases
  • ✅ Register updateWiki tool in wiki toolset (tools.ts)

Implementation Details

  • API Endpoint: Uses PATCH /api/v2/wikis/:wikiId via backlog.patchWiki()
  • Parameters:
    • wikiId (required): Wiki page ID - accepts both string and number
    • name (optional): New wiki page name
    • content (optional): New wiki page content
    • mailNotify (optional): Whether to send notification emails (default: false)
  • Pattern Consistency: Follows existing codebase patterns from addWiki.ts and updateIssue.ts

Test Coverage

All 7 tests passing:

  • ✓ Returns updated wiki as formatted JSON
  • ✓ Calls backlog.patchWiki with correct params (all parameters)
  • ✓ Handles name-only updates
  • ✓ Handles content-only updates
  • ✓ Converts string wikiId to number
  • ✓ Handles numeric wikiId
  • ✓ Includes mailNotify parameter

Full test suite: 281/281 tests passing

Verification

npm test -- updateWiki  # All tests passing
npm test               # Full suite passing (281/281)
npm run build          # Build successful

References

Checklist

  •  Implementation follows existing code patterns
  •  Comprehensive test coverage added
  •  All tests passing (unit + integration)
  •  Build successful
  •  Tool registered in wiki toolset
  •  Code reviewed and approved

🤖 Generated with Claude Code

Add support for updating existing wiki pages through the Backlog API.

Changes:
- Add updateWiki.ts tool implementation using backlog.patchWiki()
- Add comprehensive test suite with 7 test cases covering all parameter combinations
- Register updateWiki tool in wiki toolset

Implementation details:
- Accepts wikiId (required), name, content, and mailNotify (all optional)
- Supports wikiId as both string and number (converts string to number)
- Follows existing codebase patterns from addWiki and updateIssue tools
- Uses backlog-js PATCH /api/v2/wikis/:wikiId API endpoint

Test coverage:
- All parameters test
- Individual parameter tests (name only, content only)
- Type conversion tests (string/number wikiId)
- Optional parameter handling (mailNotify)
- All 7 tests passing, total test suite: 281/281 passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ryotsukuda333
Copy link
Author

ryotsukuda333 commented Nov 17, 2025

@trknhr

お世話になっております!
いつもbacklogのmcpを利用させていただき、ありがとうございます。

いつも利用しているのですが、wikiを更新したいと思うことが多々ありまして
MCPのツールとしては提供がなかったのでPRを作成させていただきました。
AIを利用した開発で申しわけございませんが、問題なければマージの方お願いしたいです。

お忙しいところ恐縮ですが、何卒宜しくお願い致します!


Thank you for your continued support!
I truly appreciate being able to use the Backlog MCP.
I use it regularly, and I've often wanted to update wikis, but since this functionality wasn't provided as an MCP tool, I've created a pull request.
I apologize for using AI-assisted development, but if there are no issues, I would appreciate it if you could merge it.
I apologize for taking up your time, but I would greatly appreciate your consideration!

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