Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
samirtahir91 committed Apr 1, 2024
1 parent a4172e5 commit c8c135c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/controller/githubapp_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ func (r *GithubAppReconciler) generateOrUpdateAccessToken(ctx context.Context, g

// Generate or renew access token
accessToken, expiresAt, err := generateAccessToken(
ctx,
githubApp.Spec.AppId,
githubApp.Spec.InstallId,
privateKey,
Expand Down Expand Up @@ -471,7 +472,10 @@ func updateGithubAppStatusWithRetry(ctx context.Context, r *GithubAppReconciler,
}

// function to generate new access token for gh app
func generateAccessToken(appID int, installationID int, privateKey []byte) (string, metav1.Time, error) {
func generateAccessToken(ctx context.Context, appID int, installationID int, privateKey []byte) (string, metav1.Time, error) {

l := log.FromContext(ctx)

// Parse private key
parsedKey, err := jwt.ParseRSAPrivateKeyFromPEM(privateKey)
if err != nil {
Expand Down

0 comments on commit c8c135c

Please sign in to comment.