You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+18
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,24 @@ If you want to use the updater tool to add entries into the database, you need t
34
34
35
35
The production server uses mongodb to store data, however you can also use Fongo. If you would like to install mongodb and are on mac, I used this [guide](https://zellwk.com/blog/install-mongodb/) which utilizes homebrew. You can also install `mongo` which is a command-line tool that gives you access to your mongodb, allowing you to manually search through the database.
36
36
37
+
### GitHub App Authentication
38
+
39
+
The updater can be used with a GitHub Token or GitHub App. To use a GitHub app you need to generate an app on GitHub. Once you've done that you need to convert the key to PKCS#8 format using the following command:
Copy file name to clipboardexpand all lines: adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/github/GitHubAuth.kt
+74-5
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,57 @@
1
1
packagenet.adoptium.api.v3.dataSources.github
2
2
3
-
importorg.slf4j.LoggerFactory
4
3
importjava.io.File
5
4
importjava.nio.file.Files
6
5
importjava.util.Properties
6
+
importorg.slf4j.LoggerFactory
7
+
importio.jsonwebtoken.Jwts
8
+
importio.jsonwebtoken.SignatureAlgorithm
9
+
importorg.kohsuke.github.GHAppInstallation
10
+
importorg.kohsuke.github.GHAppInstallationToken
11
+
importjava.security.KeyFactory
12
+
importjava.security.spec.PKCS8EncodedKeySpec
13
+
importjava.util.Base64
14
+
importjava.util.Date
15
+
importorg.kohsuke.github.GitHub
16
+
importorg.kohsuke.github.GitHubBuilder
7
17
8
18
classGitHubAuth {
19
+
data classAuthInfo(valtoken:String?, valtype:AuthType, valexpirationTime:Date?)
Copy file name to clipboardexpand all lines: adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/github/graphql/clients/GraphQLRequestImpl.kt
Copy file name to clipboardexpand all lines: adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/DefaultUpdaterHtmlClient.kt
0 commit comments