This commit is contained in:
domgoer 2019-10-21 20:56:35 +08:00
parent 344a444c69
commit ad10c789b8
2 changed files with 4 additions and 4 deletions

View file

@ -20,7 +20,7 @@ type Dag struct {
graph map[string]*Vertex
}
// Vertex is a vetex in the graph.
// Vertex is a vertex in the graph.
type Vertex struct {
Name string
Skip bool
@ -28,7 +28,7 @@ type Vertex struct {
}
// New creates a new directed acyclic graph (dag) that can
// determinte if a stage has dependencies.
// determinate if a stage has dependencies.
func New() *Dag {
return &Dag{
graph: make(map[string]*Vertex),
@ -58,7 +58,7 @@ func (d *Dag) Dependencies(name string) []string {
return d.dependencies(vertex)
}
// Ancestors returns the acentors of the vertex.
// Ancestors returns the ancestors of the vertex.
func (d *Dag) Ancestors(name string) []*Vertex {
vertex := d.graph[name]
return d.ancestors(vertex)

View file

@ -410,7 +410,7 @@ func (t *triggerer) Trigger(ctx context.Context, repo *core.Repository, base *co
for _, stage := range stages {
// here we re-work the dependencies for the stage to
// account for the fact that some steps may be skipped
// and may otherwise break the dependnecy chain.
// and may otherwise break the dependency chain.
stage.DependsOn = dag.Dependencies(stage.Name)
// if the stage is pending dependencies, but those