Skip to content

Commit c5a1dc7

Browse files
fix: asset source is enum, add more for logs on webhook (#2284)
Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com>
1 parent 9a1799c commit c5a1dc7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

internal/httpserve/handlers/integration_github_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (h *Handler) GitHubAppWebhookHandler(ctx echo.Context, openapiCtx *OpenAPIC
5656

5757
installation, err := h.resolveGitHubAppWebhookInstallation(webhookCtx, payload)
5858
if err != nil {
59-
logx.FromContext(webhookCtx).Error().Err(err).Msg("failed to resolve github app webhook installation")
59+
logx.FromContext(webhookCtx).Error().Err(err).Interface("payload", string(payload)).Msg("failed to resolve github app webhook installation")
6060

6161
return h.BadRequest(ctx, err, openapiCtx)
6262
}

internal/integrations/definitions/githubapp/mappings.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ var mapExprRepositoryAsset = providerkit.CelMapExpr([]providerkit.CelMapEntry{
130130
{Key: integrationgenerated.IntegrationMappingAssetDisplayName, Expr: "payload.NameWithOwner"},
131131
{Key: integrationgenerated.IntegrationMappingAssetName, Expr: "payload.NameWithOwner"},
132132
{Key: integrationgenerated.IntegrationMappingAssetAssetType, Expr: `"REPOSITORY"`},
133-
{Key: integrationgenerated.IntegrationMappingAssetSourceType, Expr: `"github"`},
133+
{Key: integrationgenerated.IntegrationMappingAssetSourceType, Expr: `"IMPORTED"`},
134134
{Key: integrationgenerated.IntegrationMappingAssetWebsite, Expr: "payload.URL"},
135135
{Key: integrationgenerated.IntegrationMappingAssetObservedAt, Expr: "payload.UpdatedAt"},
136-
{Key: integrationgenerated.IntegrationMappingAssetCategories, Expr: `payload.IsPrivate ? ["private"] : ["public"]`},
136+
{Key: integrationgenerated.IntegrationMappingAssetCategories, Expr: `payload.IsPrivate ? ["private", "repository"] : ["public", "repository"]`},
137137
})
138138

139139
// mapExprDirectoryAccount is the CEL mapping expression for GitHub organization member payloads mapped to DirectoryAccount

0 commit comments

Comments
 (0)