mirror of
https://github.com/go-gitea/gitea
synced 2025-10-28 09:58:25 +00:00
Add commit status for push event
This commit is contained in:
@@ -43,12 +43,7 @@ func (RunJob) TableName() string {
|
||||
return "bots_run_job"
|
||||
}
|
||||
|
||||
// LoadAttributes load Run if not loaded
|
||||
func (job *RunJob) LoadAttributes(ctx context.Context) error {
|
||||
if job == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (job *RunJob) LoadRun(ctx context.Context) error {
|
||||
if job.Run == nil {
|
||||
run, err := GetRunByID(ctx, job.RunID)
|
||||
if err != nil {
|
||||
@@ -56,6 +51,18 @@ func (job *RunJob) LoadAttributes(ctx context.Context) error {
|
||||
}
|
||||
job.Run = run
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// LoadAttributes load Run if not loaded
|
||||
func (job *RunJob) LoadAttributes(ctx context.Context) error {
|
||||
if job == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := job.LoadRun(ctx);err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return job.Run.LoadAttributes(ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user