spring-io / github-changelog-generator

Generates release notes that can be published to GitHub
Apache License 2.0
109 stars 34 forks source link

Require token-based authentication #104

Closed wilkinsona closed 8 months ago

wilkinsona commented 8 months ago

When there's a token configured, it's used as the value of the password:

https://github.com/spring-io/github-changelog-generator/blob/3e01a00fdfd94ee75af9cf6f8d334166b16e891d/src/main/java/io/spring/githubchangeloggenerator/github/service/GitHubProperties.java#L51

When deciding whether to configure authentication, there has to be a username:

https://github.com/spring-io/github-changelog-generator/blob/3e01a00fdfd94ee75af9cf6f8d334166b16e891d/src/main/java/io/spring/githubchangeloggenerator/github/service/GitHubService.java#L60-L62

With token-based authentication, a username isn't necessary. Instead, we should present the token as part of an Authentication: Bearer header.

wilkinsona commented 8 months ago

GitHub no longer supports username and password based authentication. The password has to be a token, and when it is, the username is ignored. We should adapt to this by dropping support for github.username and github.password and requiring github.token instead.