Skip to content
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

Bump github.com/buildkite/go-buildkite/v4 from 4.0.1 to 4.1.0 #399

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 18, 2024

Bumps github.com/buildkite/go-buildkite/v4 from 4.0.1 to 4.1.0.

Release notes

Sourced from github.com/buildkite/go-buildkite/v4's releases.

v4.1.0 (Teams Work)

What's Changed

Full Changelog: buildkite/go-buildkite@v4.0.1...v4.1.0

Changelog

Sourced from github.com/buildkite/go-buildkite/v4's changelog.

v4.1.0 (2024-11-06)

  • Support Team Suites and Team Pipelines API #205 (lizrabuya)
  • Expand the Teams service to support additional endpoints #204 (mstifflin)

v4.0.0 (2024-10-21)

Our first major release in a little while! This release is mostly a cleanup release, which does not contain any major feature releases.

Notable Breaking Changes

Import Path

The module import path has changed from github.com/buildkite/go-buildkite/v3/buildkite to github.com/buildkite/go-buildkite/v4. Note that the version number has changed, and that the buildkite package is now at the root of the module.

Contexts

All methods that interact with Buildkite API now require a context parameter. This is to allow for better control over timeouts and cancellations. For example, to spend a maximum of five seconds trying to get a list of builds for a pipeline, you could run:

ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
builds, _, err := client.Builds.ListByPipeline(ctx, "my-org", "my-pipeline", nil)

Removal of pointers

Previously, this library had a lot of pointers in its method signatures and struct values. Where practical, we've removed these pointers to make the API clearer and more idiomatic. This means that you'll need to update your code to pass values directly instead of pointers. For example, previously you might have done:

pipeline := buildkite.Pipeline{
  Name: buildkite.String("My Pipeline"),
}
_, _, err := client.Pipelines.Create(ctx, "my-org", &pipeline)

Now, you should do:

pipeline := buildkite.Pipeline{
  Name: "My Pipeline",
}
_, _, err := client.Pipelines.Create(ctx, "my-org", pipeline)

Along with this change, we've removed the buildkite.String, buildkite.Bool, and buildkite.Int helper functions. You should now pass values directly to the struct fields.

One notable difference in API after this change is that many (but not all!) Update methods for various API resources previously unmarshalled their response into a parameter that was passed into them. This is no longer the case, and the response is now returned directly from the method. For example, previously you might have done:

updatePipeline := buildkite.UpdatePipeline{
  Name: buildkite.String("My Pipeline"),
}
_, err := client.Pipelines.Update("my-org", "my-pipeline", &updatePipeline)
// Result of update is unmarshalled into updatePipeline, with surprising results in some cases

now, you should do:

... (truncated)

Commits
  • f02ac5f Merge pull request #206 from buildkite/release-v4.1.0
  • b6a4a6f Update files for new release 4.1.0
  • 8be22bb Merge pull request #205 from buildkite/teams-api-update
  • 4bd3e18 Tidy up import packages
  • ac5a799 Fix failing tests
  • 719dc13 fix formatting error and skip failing tests
  • fcc96d6 Add Team Suites API
  • 77422e9 Add team pipelines API
  • e382f5b Merge pull request #204 from mstifflin/teams-api
  • bb26f79 Move team member related functions to a separate file and service
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/buildkite/go-buildkite/v4](https://github.com/buildkite/go-buildkite) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/buildkite/go-buildkite/releases)
- [Changelog](https://github.com/buildkite/go-buildkite/blob/main/CHANGELOG.md)
- [Commits](buildkite/go-buildkite@v4.0.1...v4.1.0)

---
updated-dependencies:
- dependency-name: github.com/buildkite/go-buildkite/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested a review from mcncl as a code owner November 18, 2024 16:44
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Nov 18, 2024
@mcncl mcncl merged commit 2135aeb into main Nov 19, 2024
1 check passed
@mcncl mcncl deleted the dependabot/go_modules/github.com/buildkite/go-buildkite/v4-4.1.0 branch November 19, 2024 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant