From 365d49ca5212da0ef74cc9a98f943e0b97fa51b9 Mon Sep 17 00:00:00 2001 From: Ross Golder Date: Sat, 2 May 2026 09:57:01 +0700 Subject: [PATCH] Fix type cast and signature issues after rebase onto upstream/main - Cast org.Visibility.String() to api.UserVisibility in ToOrganization - Cast t.AccessMode.ToString() to api.AccessLevelName in ToTeams - Update webhook notifier to pass repo to ToActionWorkflowRun Co-Authored-By: Claude Sonnet 4.6 --- services/convert/convert.go | 4 ++-- services/webhook/notifier.go | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/services/convert/convert.go b/services/convert/convert.go index 82312056e3..7c0dd55530 100644 --- a/services/convert/convert.go +++ b/services/convert/convert.go @@ -705,7 +705,7 @@ func ToOrganization(ctx context.Context, org *organization.Organization) *api.Or Description: org.Description, Website: org.Website, Location: org.Location, - Visibility: org.Visibility.String(), + Visibility: api.UserVisibility(org.Visibility.String()), RepoAdminChangeTeamAccess: org.RepoAdminChangeTeamAccess, } } @@ -734,7 +734,7 @@ func ToTeams(ctx context.Context, teams []*organization.Team, loadOrgs bool) ([] Description: t.Description, IncludesAllRepositories: t.IncludesAllRepositories, CanCreateOrgRepo: t.CanCreateOrgRepo, - Permission: t.AccessMode.ToString(), + Permission: api.AccessLevelName(t.AccessMode.ToString()), Units: t.GetUnitNames(), UnitsMap: t.GetUnitsMap(), } diff --git a/services/webhook/notifier.go b/services/webhook/notifier.go index 7627935a32..d2575e9931 100644 --- a/services/webhook/notifier.go +++ b/services/webhook/notifier.go @@ -1043,8 +1043,7 @@ func (*webhookNotifier) WorkflowRunStatusUpdate(ctx context.Context, repo *repo_ return } - run.Repo = repo - convertedRun, err := convert.ToActionWorkflowRun(ctx, run, nil) + convertedRun, err := convert.ToActionWorkflowRun(ctx, repo, run, nil) if err != nil { log.Error("ToActionWorkflowRun: %v", err) return