Loading
Commits on Source 99
-
Ville Skyttä authored
Changelog: Improvements
-
Timo Furrer authored
refactor: migrate to math/rand/v2 See merge request !2759
-
Florian Forster authored
Introduce a new `WorkItemsService` to provide high-level API access to GitLab's work items (epics, issues, and tasks) through GraphQL. This implementation includes: - `GetWorkItem(projectPath, iid)`: Get work item by project path and IID - `GetWorkItemByID(gid)`: Get work item by global ID (string or int64) - `WorkItem` struct with common fields in idiomatic Go types - Type conversion utilities for GraphQL responses: - `gidGQL`: Parse global IDs (e.g. "gid://gitlab/WorkItem/179785913") - `iidGQL`: Convert IID strings to int64 - `userCoreGQL`: Convert GraphQL UserCore to BasicUser - `workItemGQL`: Internal GraphQL response representation with unwrap() - Comprehensive test coverage including success and error scenarios - Generated mock interfaces and client registration This addresses the current gaps in the GitLab Go client: - No API support for tasks - Deprecated REST API for epics (replaced by work items) - High friction for GraphQL usage (manual query construction, custom struct definitions, type conversions) The service follows established patterns in the Go client (service-based architecture, `RequestOptionFunc` support, `ErrNotFound` for missing resources, separate internal/public types). Issue: #2213
-
Florian Forster authored
Co-authored-by:
Timo Furrer <tfurrer@gitlab.com> -
Florian Forster authored
-
Florian Forster authored
Expand `ListWorkItemsOptions` to support most available GraphQL query parameters for work items, enabling full-featured filtering, sorting, searching, and pagination capabilities. Changes: - Add 30+ filter fields including assignees, labels, milestones, iterations, health status, CRM associations, and reactions - Add time-based filters (created, updated, closed, due dates) - Add sorting, search, and pagination parameters - Implement generic `gqlVariables()` function using reflection to extract GraphQL variable definitions from struct tags - Replace manual field mapping with struct tag annotations using format `gql:"name Type"` - Add `variablesGQL` helper type with `Definitions()` and `Arguments()` methods for template rendering The new approach uses reflection to automatically generate GraphQL query variables from struct fields, eliminating the need to maintain separate field type mappings. Each field is annotated with its GraphQL name and type via struct tags (e.g., `gql:"state IssuableState"`). This refactoring makes it trivial to add new query parameters in the future - simply add the field to the struct with appropriate tags. Technical details: - `gqlVariables()` validates struct tags and only includes non-zero fields - Template now uses `variablesGQL.Definitions()` for query signature - Template uses `variablesGQL.Arguments()` for field parameters - Comprehensive test coverage added for all new fields
-
Florian Forster authored
-
Florian Forster authored
-
Florian Forster authored
-
Florian Forster authored
-
Florian Forster authored
-
Florian Forster authored
-
Florian Forster authored
This check is _optional_ and only done when the schema file is available at `schema/gitlab.graphql`.
-
Florian Forster authored
-
Florian Forster authored
- Fix doc comment - Use `range i` syntax - Use `strings.Cut`
-
Florian Forster authored
-
Florian Forster authored
Add full pagination support to `ListWorkItems` by implementing GraphQL cursor-based pagination following the Relay specification. This allows callers to efficiently iterate through large result sets. Changes: - Add `PageInfo` type to `Response` for GraphQL cursor pagination metadata - Add `connectionGQL[T]` generic type for unmarshaling paginated responses - Replace templated queries with static query using nullable variables - Add `WithNext()` function to handle all pagination styles uniformly - Update `Scan2()` to use `WithNext()` for automatic pagination - Return `Response` with pagination info from `ListWorkItems` - Remove unused `gqlVariable` types and helper functions - Add comprehensive unit tests for pagination scenarios
-
Florian Forster authored
-
Florian Forster authored
`WithNext` previously used inline signaling by returning `nil` when no more pages were available. This required callers to check for nil, which is easy to overlook and inconsistent with Go conventions. Add a second boolean return value following the comma-ok idiom used by map accesses and type assertions. This makes pagination termination explicit and harder to miss. Update `Scan2`, `ExampleWithNext`, and all call sites accordingly.
-
Timo Furrer authored
feat(workitems): Add an initial "Work Items" service with "Get" and "List" methods. See merge request !2719
-
semantic-release-bot authored
## 1.34.0 ###
🚀 Features - feat(workitems): Add an initial "Work Items" service with "Get" and "List" methods. ([!2719](!2719)) by [Florian Forster](https://gitlab.com/fforster) ###🔄 Other Changes - refactor: migrate to math/rand/v2 ([!2759](!2759)) by [Ville Skyttä](https://gitlab.com/scop) # [1.34.0](v1.33.0...v1.34.0) (2026-02-13) ### Bug Fixes * **workitems:** Use `int64` for global work item IDs. ([f04e3d08](f04e3d08)) ### Features * **request_options:** Add boolean return value to `WithNext`. ([1cd1e1e5](1cd1e1e5)) * **workitems:** Add comprehensive filtering to `ListWorkItemsOptions` ([052a8978](052a8978)) * **workitems:** Add pagination support to `ListWorkItems`. ([cfdf5ee6](cfdf5ee6)) * **workitems:** Add WorkItems service with Get methods ([00925c26](00925c26)), closes [#2213](#2213) * **workitems:** Implement the `ListWorkItems` method. ([4f8a7092](4f8a7092)) -
🤖 GitLab Bot 🤖 authored
-
Timo Furrer authored
chore(deps): update node docker tag to v25 See merge request !2762
-
Timo Furrer authored
Upstream support will be added with: gitlab-org/gitlab!223546 Refs gitlab-org/gitlab#586417
-
aishahsofea authored
Changelog: Improvements
-
Patrick Rice authored
fix(integration): Add missing json tags to ms teams struct See merge request !2703
-
Preethi Atchudan authored
Changelog: Improvements
-
Patrick Rice authored
feat(groups): add code_owner_approval_required in a group's default_branch_protection_defaults See merge request !2725
-
GitLab Dependency Bot authored
chore(deps): update module buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go to v1.36.11-20260209202127-80ab13bee0bf.1 Changelog: Improvements
-
Patrick Rice authored
chore(deps): update module buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go to v1.36.11-20260209202127-80ab13bee0bf.1 See merge request !2749
-
semantic-release-bot authored
## 1.35.0 ###
🚀 Features - feat(groups): add code_owner_approval_required in a group's default_branch_protection_defaults ([!2725](!2725)) by [Preethi Atchudan](https://gitlab.com/preethiatchudan) ###🐛 Bug Fixes - fix(integration): Add missing json tags to ms teams struct ([!2703](!2703)) by [aishahsofea](https://gitlab.com/aishahsofea) ###🔄 Other Changes - chore(deps): update module buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go to v1.36.11-20260209202127-80ab13bee0bf.1 ([!2749](!2749)) by [GitLab Dependency Bot](https://gitlab.com/gitlab-dependency-update-bot) - chore(deps): update node docker tag to v25 ([!2762](!2762)) by [GitLab Dependency Bot](https://gitlab.com/gitlab-dependency-update-bot) # [1.35.0](v1.34.0...v1.35.0) (2026-02-16) ### Bug Fixes * **integration:** Add missing json tags to ms teams struct ([dafd6fd9](dafd6fd9)) -
🤖 GitLab Bot 🤖 authored
-
Timo Furrer authored
chore(deps): update module buf.build/go/protovalidate to v1.1.2 See merge request !2757
-
Zubeen authored
Changelog: Improvements
-
Timo Furrer authored
feat: add support for google chat APIs Closes #2222 See merge request !2766
-
semantic-release-bot authored
## 1.36.0 ###
🚀 Features - feat: add support for google chat APIs ([!2766](!2766)) by [Zubeen](https://gitlab.com/syedzubeen) ###🔄 Other Changes - chore(deps): update module buf.build/go/protovalidate to v1.1.2 ([!2757](!2757)) by [GitLab Dependency Bot](https://gitlab.com/gitlab-dependency-update-bot) # [1.36.0](v1.35.0...v1.36.0) (2026-02-17) ### Features * add support for google chat APIs ([81e58cbc](81e58cbc)) -
🤖 GitLab Bot 🤖 authored
-
🤖 GitLab Bot 🤖 authored
-
Timo Furrer authored
chore(deps): update dependency golangci-lint to v2.10.0 See merge request !2768
-
Timo Furrer authored
chore(deps): update golangci/golangci-lint docker tag to v2.10.0 See merge request !2769
-
🤖 GitLab Bot 🤖 authored
-
🤖 GitLab Bot 🤖 authored
-
Timo Furrer authored
chore(deps): update golangci/golangci-lint docker tag to v2.10.1 See merge request gitlab-org/api/client-go!2771
-
Timo Furrer authored
chore(deps): update dependency golangci-lint to v2.10.1 See merge request !2770
-
Mohamed Mongy authored
Changelog: Improvements
-
Patrick Rice authored
Update links of geo_sites.go See merge request !2782
-
Artem Mikheev authored
Changelog: Improvements
-
Patrick Rice authored
Support system & system_action fields for merge event attributes See merge request !2737
-
semantic-release-bot authored
## 1.37.0 ###
🚀 Features - Support system & system_action fields for merge event attributes ([!2737](!2737)) by [Artem Mikheev](https://gitlab.com/renbou) ###🔄 Other Changes - Update links of geo_sites.go ([!2782](!2782)) by [Mohamed Mongy](https://gitlab.com/mohamedmongy96) - chore(deps): update dependency golangci-lint to v2.10.1 ([!2770](!2770)) by [GitLab Dependency Bot](https://gitlab.com/gitlab-dependency-update-bot) - chore(deps): update golangci/golangci-lint docker tag to v2.10.1 ([!2771](!2771)) by [GitLab Dependency Bot](https://gitlab.com/gitlab-dependency-update-bot) - chore(deps): update golangci/golangci-lint docker tag to v2.10.0 ([!2769](!2769)) by [GitLab Dependency Bot](https://gitlab.com/gitlab-dependency-update-bot) - chore(deps): update dependency golangci-lint to v2.10.0 ([!2768](!2768)) by [GitLab Dependency Bot](https://gitlab.com/gitlab-dependency-update-bot) # [1.37.0](v1.36.0...v1.37.0) (2026-02-19) -
Mohamed Othman authored
Changelog: Improvements
-
Heidi Berry authored
docs: Fix broken documentation links in attestations.go See merge request !2779
-
Mohamed Othman authored
Changelog: Improvements
-
Heidi Berry authored
docs: Fix broken GitLab docs anchors for alert_management API See merge request !2777
-
Mohamed Mongy authored
Changelog: Improvements
-
Heidi Berry authored
feat(labels): add missing params and edit links See merge request !2778
-
Mohamed Mongy authored
Changelog: Improvements
-
Heidi Berry authored
feat(events): Add missing parameters for label operations and update documentation links See merge request !2781
-
semantic-release-bot authored
## 1.38.0 ###
🚀 Features - feat(events): Add missing parameters for label operations and update documentation links ([!2781](!2781)) by [Mohamed Mongy](https://gitlab.com/mohamedmongy96) - feat(labels): add missing params and edit links ([!2778](!2778)) by [Mohamed Mongy](https://gitlab.com/mohamedmongy96) ###🔄 Other Changes - docs: Fix broken GitLab docs anchors for alert_management API ([!2777](!2777)) by [Mohamed Othman](https://gitlab.com/mohamed.othman27) - docs: Fix broken documentation links in attestations.go ([!2779](!2779)) by [Mohamed Othman](https://gitlab.com/mohamed.othman27) # [1.38.0](v1.37.0...v1.38.0) (2026-02-19) ### Features * **events:** Add missing parameters for label operations and update documentation links ([11b9f08b](11b9f08b)) * **labels:** add missing params and edit links ([ec1b92bf](ec1b92bf)) -
Mohamed Othman authored
Changelog: Improvements
-
Heidi Berry authored
feat(groups): Add provider to AddGroupSAMLLinkOptions Closes #2227 See merge request !2776
-
Mohamed Othman authored
Changelog: Improvements
-
Heidi Berry authored
feat: Add hide backlog and closed list properties to IssueBoards Closes #2231 See merge request !2780
-
semantic-release-bot authored
## 1.39.0 ###
🚀 Features - feat: Add hide backlog and closed list properties to IssueBoards ([!2780](!2780)) by [Mohamed Othman](https://gitlab.com/mohamed.othman27) - feat(groups): Add provider to AddGroupSAMLLinkOptions ([!2776](!2776)) by [Mohamed Othman](https://gitlab.com/mohamed.othman27) # [1.39.0](v1.38.0...v1.39.0) (2026-02-19) ### Features * Add hide backlog and closed list properties to IssueBoards ([a66984ee](a66984ee)) * **groups:** Add provider to AddGroupSAMLLinkOptions ([bb97c7f3](bb97c7f3)) -
Alekhin Sergey authored
Changelog: Improvements
-
Patrick Rice authored
Add missing parameters to MergeRequestDiff struct See merge request !2767
-
Mohamed Othman authored
Changelog: Improvements
-
Patrick Rice authored
feat: Add visibility option to listgroupoptions See merge request gitlab-org/api/client-go!2775
-
Tomas Vik authored
Changelog: Improvements
-
Patrick Rice authored
chore(oauth): use go:embed to extract the html See merge request !2740
-
semantic-release-bot authored
## 1.40.0 ###
🚀 Features - feat: Add visibility option to listgroupoptions ([!2775](!2775)) by [Mohamed Othman](https://gitlab.com/mohamed.othman27) - Add missing parameters to MergeRequestDiff struct ([!2767](!2767)) by [Alekhin Sergey](https://gitlab.com/a.sergey) ###🔄 Other Changes - chore(oauth): use go:embed to extract the html ([!2740](!2740)) by [Tomas Vik](https://gitlab.com/viktomas) # [1.40.0](v1.39.0...v1.40.0) (2026-02-21) ### Features * Add visibility option to listgroupoptions ([ca08a629](ca08a629)) -
Mohamed Mongy authored
Changelog: Improvements
-
Patrick Rice authored
Add missing group API parameters to Go SDK structs See merge request !2764
-
semantic-release-bot authored
## 1.40.1 ###
🐛 Bug Fixes - Add missing group API parameters to Go SDK structs ([!2764](!2764)) by [Mohamed Mongy](https://gitlab.com/mohamedmongy96) ## [1.40.1](v1.40.0...v1.40.1) (2026-02-21) -
GitLab Dependency Bot authored
Changelog: Improvements
-
Patrick Rice authored
chore(deps): update module buf.build/go/protovalidate to v1.1.3 See merge request !2783
-
Mohamed Othman authored
Changelog: Improvements
-
Heidi Berry authored
feat: Add missing event toggles to Group Slack integration Closes #2233 See merge request !2784
-
semantic-release-bot authored
## 1.41.0 ###
🚀 Features - feat: Add missing event toggles to Group Slack integration ([!2784](!2784)) by [Mohamed Othman](https://gitlab.com/mohamed.othman27) ###🔄 Other Changes - chore(deps): update module buf.build/go/protovalidate to v1.1.3 ([!2783](!2783)) by [GitLab Dependency Bot](https://gitlab.com/gitlab-dependency-update-bot) # [1.41.0](v1.40.1...v1.41.0) (2026-02-22) ### Features * Add missing event toggles to Group Slack integration ([a4e84a27](a4e84a27)) -
Mohamed Mongy authored
Changelog: Improvements
-
Patrick Rice authored
Add `primary_domain` and `pages_primary_domain` to Pages structs See merge request !2786
-
kilianpaquier authored
Changelog: Improvements
-
Patrick Rice authored
fix: Fixed a set of endpoints where inputs were escaped and should not be escaped Closes #2225 See merge request !2772
-
semantic-release-bot authored
## 1.41.1 ###
🐛 Bug Fixes - fix: Fixed a set of endpoints where inputs were escaped and should not be escaped ([!2772](!2772)) by [kilianpaquier](https://gitlab.com/u.kilianpaquier) ###🔄 Other Changes - Add `primary_domain` and `pages_primary_domain` to Pages structs ([!2786](!2786)) by [Mohamed Mongy](https://gitlab.com/mohamedmongy96) ## [1.41.1](v1.41.0...v1.41.1) (2026-02-24) ### Bug Fixes * Fixed a set of endpoints where inputs were escaped and should not be escaped ([d6d7b17f](d6d7b17f)) -
Mohamed Othman authored
Changelog: Improvements
-
Patrick Rice authored
feat: Add public_email to CreateUserOptions Closes #2236 See merge request !2787
-
semantic-release-bot authored
## 1.42.0 ###
🚀 Features - feat: Add public_email to CreateUserOptions ([!2787](gitlab-org/api/client-go!2787)) by [Mohamed Othman](https://gitlab.com/mohamed.othman27) # [1.42.0](gitlab-org/api/client-go@v1.41.1...v1.42.0) (2026-02-24) ### Features * Add public_email to CreateUserOptions ([ab1ec313](gitlab-org/api/client-go@ab1ec313)) -
Florian Forster authored
Introduce `ScanAndCollectN`, which works like `ScanAndCollect` but stops collecting once _n_ items have been gathered. Negative values of _n_ retain the existing "collect all" behaviour, allowing `ScanAndCollect` to delegate to it. This allows capping search results before they overwhelm callers. Add an example function demonstrating how to use `ScanAndCollectN` with a note directing users toward `Scan2` when iteration is preferred over collecting into a slice.
-
Florian Forster authored
-
Florian Forster authored
feat(pagination): Add `ScanAndCollectN` to collect at most _n_ results. See merge request !2788
-
semantic-release-bot authored
## 1.43.0 ###
🚀 Features - feat(pagination): Add `ScanAndCollectN` to collect at most _n_ results. ([!2788](!2788)) by [Florian Forster](https://gitlab.com/fforster) # [1.43.0](v1.42.0...v1.43.0) (2026-02-25) ### Features * **pagination:** Add `ScanAndCollectN` to collect at most _n_ results. ([f821c08c](f821c08c)) -
GitLab Dependency Bot authored
Changelog: Improvements
-
Patrick Rice authored
chore(deps): update module github.com/graph-gophers/graphql-go to v1.9.0 See merge request !2789
-
Timo Furrer authored
Implement runner controller instance-level runner scope support See merge request !2765
-
semantic-release-bot authored
## 1.44.0 ###
🚀 Features - Implement runner controller instance-level runner scope support ([!2765](!2765)) by [Timo Furrer](https://gitlab.com/timofurrer) ###🔄 Other Changes - chore(deps): update module github.com/graph-gophers/graphql-go to v1.9.0 ([!2789](!2789)) by [GitLab Dependency Bot](https://gitlab.com/gitlab-dependency-update-bot) # [1.44.0](v1.43.0...v1.44.0) (2026-02-26) -
Florian Forster authored
The `DeleteEpic` function requires the epic's internal ID (IID), scoped per group, not the global ID. This bug went undetected because only a single epic was ever created across all integration tests. With exactly one epic in the system, its global ID and its group-scoped IID are both 1 — so passing the wrong field had no observable effect. Adding `TestCreateWorkItem` in !2751, which creates a work item of type Epic, incremented the global epic ID counter to 2 independently of the IID sequence. The epic created by `TestEpicTimeFieldParsing` then received IID 1 within its group but global ID 2. The cleanup function passed global ID 2 to `DeleteEpic`, which the API rejected with 403 Forbidden since no epic with IID 2 existed in that group.
-
Florian Forster authored
test(integration): Use epic IID instead of ID in `DeleteEpic` cleanup. See merge request !2794
-
Mohamed Mongy authored
Changelog: Improvements
-
Patrick Rice authored
Add LockMembershipsToSAML support to Application Settings See merge request !2791
-
semantic-release-bot authored
## 1.45.0 ###
🚀 Features - Add LockMembershipsToSAML support to Application Settings ([!2791](!2791)) by [Mohamed Mongy](https://gitlab.com/mohamedmongy96) ###🔄 Other Changes - test(integration): Use epic IID instead of ID in `DeleteEpic` cleanup. ([!2794](!2794)) by [Florian Forster](https://gitlab.com/fforster) # [1.45.0](v1.44.0...v1.45.0) (2026-02-27) ### Bug Fixes * **test:** Use epic IID instead of ID in `DeleteEpic` cleanup. ([49dea058](49dea058))