Skip to content

Commit 8b09c84

Browse files
committed
Update module path and docs for v1.3.0 release
Changed the module path from /v2 to the base path in go.mod and updated all import statements in README.md accordingly. Updated changelog and documentation to reflect v1.3.0 instead of v2.0.0, and removed the v2 migration guide from the README.
1 parent 9f23369 commit 8b09c84

File tree

3 files changed

+14
-56
lines changed

3 files changed

+14
-56
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [v2.0.0] - 2025-08-16
8+
## [v1.3.0] - 2025-08-16
99

1010
### Added
1111

@@ -15,8 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Changed
1717

18-
- **BREAKING**: Unified `NewApplicationTokenSource` function now uses Go generics to support both int64 App IDs and string Client IDs
19-
- **BREAKING**: Go version requirement bumped to 1.21+ (required for generics support)
18+
- Unified `NewApplicationTokenSource` function now uses Go generics to support both int64 App IDs and string Client IDs
19+
- Go version requirement bumped to 1.21+ (required for generics support)
2020
- Updated Go version to 1.25 in CI workflows and documentation
2121
- Improved CI workflow configurations with updated GitHub Actions
2222

@@ -34,7 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3434

3535
**Contributors**: @jferrl, @grinish21
3636

37-
**Full Changelog**: <https://github.com/jferrl/go-githubauth/compare/v1.2.1...v2.0.0>
37+
**Full Changelog**: <https://github.com/jferrl/go-githubauth/compare/v1.2.1...v1.3.0>
3838

3939
## [v1.2.1] - 2025-08-08
4040

README.md

Lines changed: 9 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# go-githubauth
22

3-
[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/jferrl/go-githubauth/v2)
3+
[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/jferrl/go-githubauth)
44
[![Test Status](https://github.com/jferrl/go-githubauth/workflows/tests/badge.svg)](https://github.com/jferrl/go-githubauth/actions?query=workflow%3Atests)
55
[![codecov](https://codecov.io/gh/jferrl/go-githubauth/branch/main/graph/badge.svg?token=68I4BZF235)](https://codecov.io/gh/jferrl/go-githubauth)
66
[![Go Report Card](https://goreportcard.com/badge/github.com/jferrl/go-githubauth)](https://goreportcard.com/report/github.com/jferrl/go-githubauth)
77

88
`go-githubauth` is a Go package that provides utilities for GitHub authentication, including generating and using GitHub App tokens and installation tokens.
99

10-
**v2.0.0** introduces Go generics support for unified authentication with both numeric App IDs and alphanumeric Client IDs in a single, type-safe API.
10+
**v1.3.0** introduces Go generics support for unified authentication with both numeric App IDs and alphanumeric Client IDs in a single, type-safe API.
1111

1212
## Features
1313

1414
`go-githubauth` package provides implementations of the `TokenSource` interface from the `golang.org/x/oauth2` package. This interface has a single method, Token, which returns an *oauth2.Token.
1515

16-
### v2.0.0 Features
16+
### v1.3.0 Features
1717

1818
- **🔥 Go Generics Support**: Single `NewApplicationTokenSource` function supports both `int64` App IDs and `string` Client IDs
1919
- **🛡️ Type Safety**: Compile-time verification of identifier types through generic constraints
@@ -36,7 +36,7 @@
3636
To use `go-githubauth` in your project, you need to have Go installed. You can get the package via:
3737

3838
```bash
39-
go get -u github.com/jferrl/go-githubauth/v2
39+
go get -u github.com/jferrl/go-githubauth
4040
```
4141

4242
## Usage
@@ -55,7 +55,7 @@ import (
5555
"strconv"
5656

5757
"github.com/google/go-github/v73/github"
58-
"github.com/jferrl/go-githubauth/v2"
58+
"github.com/jferrl/go-githubauth"
5959
"golang.org/x/oauth2"
6060
)
6161

@@ -99,7 +99,7 @@ import (
9999
"strconv"
100100

101101
"github.com/google/go-github/v73/github"
102-
"github.com/jferrl/go-githubauth/v2"
102+
"github.com/jferrl/go-githubauth"
103103
"golang.org/x/oauth2"
104104
)
105105

@@ -144,7 +144,7 @@ import (
144144
"os"
145145
"time"
146146

147-
"github.com/jferrl/go-githubauth/v2"
147+
"github.com/jferrl/go-githubauth"
148148
)
149149

150150
func main() {
@@ -183,7 +183,7 @@ import (
183183
"strconv"
184184
"time"
185185

186-
"github.com/jferrl/go-githubauth/v2"
186+
"github.com/jferrl/go-githubauth"
187187
)
188188

189189
func main() {
@@ -223,7 +223,7 @@ import (
223223
"os"
224224
"strconv"
225225

226-
"github.com/jferrl/go-githubauth/v2"
226+
"github.com/jferrl/go-githubauth"
227227
)
228228

229229
func main() {
@@ -251,48 +251,6 @@ func main() {
251251
}
252252
```
253253

254-
## Migration from v1.x to v2.0.0
255-
256-
v2.0.0 introduces breaking changes with Go generics support. Here's how to migrate:
257-
258-
### ⚠️ Breaking Changes
259-
260-
#### Removed Functions
261-
262-
-`NewApplicationTokenSource(int64, []byte, ...opts)`
263-
264-
#### New Unified Function
265-
266-
-`NewApplicationTokenSource[T Identifier](T, []byte, ...opts)`
267-
268-
### 🔧 Migration Guide
269-
270-
#### Before (v1.x)
271-
272-
```go
273-
// Using App ID
274-
tokenSource1, err := githubauth.NewApplicationTokenSource(12345, privateKey)
275-
```
276-
277-
#### After (v2.0.0)
278-
279-
```go
280-
import "github.com/jferrl/go-githubauth/v2"
281-
282-
// Using App ID - explicit int64 cast needed for type inference
283-
tokenSource1, err := githubauth.NewApplicationTokenSource(int64(12345), privateKey)
284-
285-
// Using Client ID - works directly
286-
tokenSource2, err := githubauth.NewApplicationTokenSource("Iv1.abc123", privateKey)
287-
```
288-
289-
### ✨ Benefits of Migration
290-
291-
- **Type Safety**: Compile-time verification of identifier types
292-
- **Code Consistency**: Single function for all authentication types
293-
- **Future-Proof**: Ready for potential new GitHub identifier formats
294-
- **Enhanced Documentation**: Better godoc with GitHub API references
295-
296254
## Contributing
297255

298256
Contributions are welcome! Please open an issue or submit a pull request on GitHub.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/jferrl/go-githubauth/v2
1+
module github.com/jferrl/go-githubauth
22

33
go 1.25
44

0 commit comments

Comments
 (0)