Commit Graph

10 Commits

Author SHA1 Message Date
Tommaso Moro 521d5e9258 Bump go-github to v74 (#826)
* update all imports to use v74

* go mod tidy

* update third party licenses

* rename

* autogen licenses
2025-08-06 22:11:50 +01:00
Tommaso Moro 33a63a053d Add support for org-level discussions in list_discussion_categories tool (#819)
* hide implementation detail for org-level queries

* update tests

* autogen

* made tests consistent with other tests
2025-08-05 11:05:45 +01:00
Tommaso Moro ff6e859555 add title to get_discussion query (#803) 2025-08-01 16:55:11 +01:00
MayorFaj 45e90aedd4 feat: add reviewers parameter to UpdatePullRequest (#285)
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
License Check / license-check (push) Has been cancelled
* feat: add reviewers parameter to UpdatePullRequest and update tests

* Update pullrequests.go

* feat: enhance update pull request functionality with reviewers support

* update README to clarify optional reviewers parameter in API documentation- go run ./cmd/github-mcp-server generate-docs

* feat: enhance UpdatePullRequest to return early if no updates or reviewers are provided

* Add updating draft state to `update_pull_request` tool (#774)

* initial impl of pull request draft state update

* appease linter

* update README

* add nosec

* fixed err return type for json marshalling

* add gql test

* Add support for org-level discussions in list_discussions tool (#775)

* make repo optional, and default to .github when not provided. improve tool description

* autogen

* update tests

* small copy paste error fixes

* refactor: streamline UpdatePullRequest logic and enhance test cases for reviewer updates

* refactor: remove redundant draft update tests and streamline UpdatePullRequest logic

* test: add unit tests for updating pull request draft state

* refactor: simplify UpdatePullRequest tests by removing unused mock data

---------

Co-authored-by: Matt Holloway <mattdholloway@github.com>
Co-authored-by: Tommaso Moro <37270480+tommaso-moro@users.noreply.github.com>
2025-07-31 11:05:38 +01:00
Tommaso Moro 89e3afdb4b Add support for org-level discussions in list_discussions tool (#775)
License Check / license-check (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
* make repo optional, and default to .github when not provided. improve tool description

* autogen

* update tests

* small copy paste error fixes
2025-07-29 14:17:03 +01:00
Tommaso Moro a939565160 feat: list_discussions sort by updatedAt & createdAt, return updatedAt and author (#690)
* added updatedAt and Author (aka User) login to query and payload

* added initial support for orderby and direction

* sort by created at instead of updated at by default

* remove unused code

* refactor to map to most suitable query based on user inputs at runtime

* updated readme with new description

* restore original categoryID code, simplify vars management

* quick fix

* update tests to account for recent changes (author login, updated at date)

* use switch statement for better readability

* remove comment

* linting

* refactored logic, simplified switch statement

* linting

* use original queries from discussions list tool for testing

* linting

* remove logging

* Complete merge by re-introducing pagination to ListDiscussions

* fix unit tests

* refactor: less repetitive interface

---------

Co-authored-by: LuluBeatson <lulubeatson@github.com>
Co-authored-by: Lulu <59149422+LuluBeatson@users.noreply.github.com>
2025-07-24 11:26:00 +01:00
Matt Holloway 7ccc6b6493 Add pagination support to GraphQL-based tools (#683)
* initial pagination for `ListDiscussions`

* redo category id var cast

* add GraphQL pagination support for discussion comments and categories

* remove pageinfo returns

* fix out ref for linter

* update docs

* move to unified pagination for consensus on params

* update docs

* refactor pagination handling

* update docs

* linter fix

* conv rest to gql params for safe lint

* add nolint

* add error handling for perPage value in ToGraphQLParams

* refactor pagination error handling

* unified params for rest andn graphql and rennamed to be uniform for golang

* add 'after' for pagination

* update docs

* Update pkg/github/discussions.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pkg/github/discussions.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pkg/github/discussions_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update default page size const

* reduce default pagination size from 100 to 30 in discussion tests

* update pagination for reverse and total

* update pagination to remove from discussions

* updated README

* improve the `ToGraphQLParams` function

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-21 16:31:29 +01:00
Martin Høst Normark be91795fd3 Bump go-github to v73.0.0 (#597)
* Bump go-github to v73.0.0

* Clean up go.mod and update licenses

* Updated remaining imports to use github package v73 instead of v72

---------

Co-authored-by: Tommaso Moro <37270480+tommaso-moro@users.noreply.github.com>
Co-authored-by: tommaso-moro <tommaso-moro@github.com>
2025-07-15 15:21:24 +01:00
Lulu 3730b840fe fix: get_discussion graphQL invalid field (#648)
* rm State which does not exist on type Discussion

* update Test_GetDiscussion

* use Discussion object instead of Issue
2025-07-07 14:43:05 +01:00
JoannaaKL 39109b3e5d Add discussion tools (#624) 2025-07-02 15:09:04 +02:00