Skip to content

Releases: cli/go-gh

go-gh 2.1.0

24 Jul 17:29
dadb47a
Compare
Choose a tag to compare

What's Changed

  • Add missing import statement to code example by @bendrucker in #124
  • Export Path function from top level gh package by @samcoe in #123
  • Add asciisanitizer package and sanitization to http clients by @samcoe in #125

New Contributors

Full Changelog: v2.0.1...v2.1.0

go-gh 2.0.1

07 Jun 14:18
4227258
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.0.0...v2.0.1

go-gh 2.0.0

16 Apr 05:13
9330cac
Compare
Choose a tag to compare

What's Changed

This is a fairly large release with a couple new features and a bunch of tech debt cleanup for go-gh.
As part of keeping this library maintainable and inline with best Go practices we have made breaking changes to a couple of the packages thus constituting a bump of the major version to v2.0.0.
Below are the listed changes ordered by package as well as migration guidelines when applicable.

gh package

  • Move CurrentRepository function from top level gh package to repository package.
    • To migrate: gh.CurrentRepository -> repository.Current
  • Move RESTClient function from top level gh package to api package.
    • To migrate: gh.RESTClient -> api.DefaultRESTClient or api.NewRESTClient
  • Move GQLClient function from top level gh package to api package.
    • To migrate: gh.GQlClient -> api.DefaultGraphQLClient or api.NewGraphQLClient
  • Move HTTPClient function from top level gh package to api package.
    • To migrate: gh.HTTPClient -> api.DefaultHTTPClient or api.NewHTTPClient
  • Add ExecInteractive by @stemar94 in #115
  • Add ExecContext function by @mislav in #115
  • Add support for GH_PATH environment variable to Exec functions by @mislav in #115

api package

  • Change references of GQL to GraphQL.
    • To migrate: api.GQLError -> api.GraphQLError
    • To migrate: api.GQLErrorItem -> api.GraphQLErrorItem
  • Change ClientOptions to be used with value semantics instead of pointer semantics.
    • This allows ClientOptions to be used with multiple clients without having to worry about them being modified.
  • Added DefaultRESTClient, DefaultHTTPClient, DefaultGraphQLClient convenience factory functions.
  • Change RESTClient interface type to a concrete type.
  • Change GraphQLClient interface type to a concrete type.
  • Change methods on HTTPError and GraphQLError custom error types to take pointers as method receivers.
  • Change GraphQLClient Query and Mutate methods to return GraphQLError instead of shurcooL/graphql.Errors.

browser package

  • Change New factory function to return *Browser instead of Browser.

config package

  • Change methods on InvalidConfigFileError and KeyNotFoundError custom error types to take pointers as method receivers.

jq package

  • Add EvaluateFormatted function to pretty print JSON output by @mjpieters in #116

repository package

  • Change Repository interface type to a concrete type.

ssh package

  • Handle errors when resolving ssh aliases to hostnames by @mislav in #111

template package

  • Change New factory function to return *Template instead of Template.

Other changes

  • Properly handle closing of files after writing by @samcoe in #113

New Contributors

Full Changelog: v1.2.1...v2.0.0

go-gh 1.2.1

27 Feb 23:50
0921311
Compare
Choose a tag to compare

What's Changed

  • Optimize searching secure storage for auth token by @samcoe in #108

Full Changelog: v1.2.0...v1.2.1

go-gh 1.2.0

22 Feb 22:54
6f61141
Compare
Choose a tag to compare

What's Changed

  • Add pagination examples for RESTClient and GQLClient by @samcoe in #102
  • Bump golang.org/x/net from 0.5.0 to 0.7.0 by @dependabot in #106
  • Expose stdin and stdout in term package by @samcoe in #103
  • Read auth token from gh if not found in other locations by @mislav in #107

New Contributors

Full Changelog: v1.1.0...v1.2.0

go-gh 1.1.0

10 Feb 16:30
98bbeb2
Compare
Choose a tag to compare

What's Changed

  • Fix printing empty arrays as result of jq expressions by @mislav in #101
  • Upgrade to Go 1.19 by @samcoe in #92
  • ExampleGQLClient_Mutate_simple by @mntlty in #99

Full Changelog: v1.0.0...v1.1.0

go-gh 1.0.0

15 Nov 08:22
5f59c9c
Compare
Choose a tag to compare

What's Changed

  • Add support for garage.github.com by @mislav in #85
  • Resolve ssh hostname aliases with ssh -G by @mislav in #84
  • Correctly measure terminal size in GH_FORCE_TTY mode by @mislav in #86
  • Change package in example_gh_test.go to gh_test by @mntlty in #88
  • Overhaul README for stable release by @mislav in #89

New Contributors

Full Changelog: v0.1.2...v1.0.0

go-gh 0.1.2

18 Oct 06:34
c2fc965
Compare
Choose a tag to compare

What's Changed

  • Allow defining template user functions by @heaths in #74
  • Fix non-Windows terminals assumed to always support 256-color by @mislav in #81
  • Disable govulncheck due to false positive by @mislav in #83
  • Fix HTTP error handling in RESTClient.Request() method by @mislav in #82

Full Changelog: v0.1.1...v0.1.2

go-gh 0.1.1

28 Sep 14:54
13c66f3
Compare
Choose a tag to compare

What's New

What's Changed

  • Unconditionally resolve "ssh.github.com" to "github.com" by @samcoe in #68
  • Return correct error on config read by @samcoe in #70
  • Bump GraphQL library and other dependencies for CVE fix by @mislav in #78
  • Change tests to use t.Setenv instead of os.Setenv by @samcoe in #65
  • Add govulncheck action by @samcoe in #71

Full Changelog: v0.1.0...v0.1.1

go-gh 0.1.0

10 Aug 15:36
4446353
Compare
Choose a tag to compare

New features

  • Add repository.ParseWithHost by @samcoe in #41
  • New packages:
  • API client improvements:
    • Export GraphQL error types by @heaths in #35
    • Add support for http_unix_socket by @samcoe in #30
    • Add additional API functionality by @samcoe in #39
    • Improvements to API package for use in cli by @samcoe in #49
    • Add context for GraphQL and REST clients by @mszostok in #50
    • Add support for localhost by @samcoe in #51
    • Allow skipping option and header resolution for api clients by @samcoe in #56

What's Changed

  • Migrate from httpmock to gock by @samcoe in #31
  • Add default host as known host when environment auth token exists by @samcoe in #36
  • Commit go mod tidy changes by @samcoe in #37
  • Update test and lint workflow files by @samcoe in #38
  • Fix up bad merge where error headers got lost by @samcoe in #43
  • Update yaml.v3 to version v3.0.1 by @koozz in #46
  • Refactor config package and add functionality by @samcoe in #44
  • Turn config into a singleton by @samcoe in #45
  • Pass correct host to gql client by @samcoe in #52
  • Do not return an error when blank config files are read by @samcoe in #55
  • Example of how to download a release asset by @samcoe in #57
  • Correctly determine IANA Time Zone name by @mislav in #58
  • Use Go 1.18 for linting by @mislav in #63
  • Update to go 1.18 by @samcoe in #64

New Contributors

Full Changelog: v0.0.3...v0.1.0