Properly set webhook secret

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2025-05-16 23:58:39 +00:00
parent 6a168ba813
commit bb798a288a
5 changed files with 21 additions and 8 deletions

View file

@ -171,7 +171,9 @@ type WorkflowJob struct {
DefaultBranch string `json:"default_branch"`
} `json:"repository"`
Organization struct {
Login string `json:"login"`
Login string `json:"login"`
// Name is a gitea specific field
Name string `json:"name"`
ID int64 `json:"id"`
NodeID string `json:"node_id"`
URL string `json:"url"`
@ -218,6 +220,13 @@ type WorkflowJob struct {
} `json:"sender"`
}
func (w WorkflowJob) GetOrgName(forgeType EndpointType) string {
if forgeType == GiteaEndpointType {
return w.Organization.Name
}
return w.Organization.Login
}
type RunnerSetting struct {
Ephemeral bool `json:"ephemeral,omitempty"`
IsElastic bool `json:"isElastic,omitempty"`