mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-06 07:10:28 +00:00
Expose SetJob to make EraseNeeds work (#35)
Related to #33 Reviewed-on: https://gitea.com/gitea/act/pulls/35 Reviewed-by: Lunny Xiao <[email protected]>
This commit is contained in:
1 parent
342ad6a51a
commit
2eb4de02ee
7 files changed
+89
-13
No files matched your search
@@ -50,7 +50,7 @@ func (w *SingleWorkflow) jobs() ([]string, []*Job, error) {
|
||||
return ids, jobs, nil
|
||||
}
|
||||
|
||||
func (w *SingleWorkflow) setJob(id string, job *Job) error {
|
||||
func (w *SingleWorkflow) SetJob(id string, job *Job) error {
|
||||
m := map[string]*Job{
|
||||
id: job,
|
||||
}
|
||||
@@ -114,8 +114,9 @@ func (j *Job) Needs() []string {
|
||||
return (&model.Job{RawNeeds: j.RawNeeds}).Needs()
|
||||
}
|
||||
|
||||
func (j *Job) EraseNeeds() {
|
||||
func (j *Job) EraseNeeds() *Job {
|
||||
j.RawNeeds = yaml.Node{}
|
||||
return j
|
||||
}
|
||||
|
||||
func (j *Job) RunsOn() []string {
|
||||
|
||||
Reference in new issue
Block a user