Monorepo for Tangled tangled.org
2

Configure Feed

Select the types of activity you want to include in your feed.

spindle,workflow: fetch the repo with tags

Signed-off-by: dawn <dawn@tangled.org>

author
dawn
committer
Tangled
date (Jun 22, 2026, 6:48 PM +0300) commit 4f6e0dc8 parent 200f2b66 change-id uzrsurrx
+66 -15
+35 -1
api/tangled/cbor_gen.go
··· 5074 5074 5075 5075 cw := cbg.NewCborWriter(w) 5076 5076 5077 - if _, err := cw.Write([]byte{163}); err != nil { 5077 + if _, err := cw.Write([]byte{164}); err != nil { 5078 5078 return err 5079 5079 } 5080 5080 ··· 5091 5091 } 5092 5092 5093 5093 if err := cbg.WriteBool(w, t.Skip); err != nil { 5094 + return err 5095 + } 5096 + 5097 + // t.Tags (bool) (bool) 5098 + if len("tags") > 1000000 { 5099 + return xerrors.Errorf("Value in field \"tags\" was too long") 5100 + } 5101 + 5102 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("tags"))); err != nil { 5103 + return err 5104 + } 5105 + if _, err := cw.WriteString(string("tags")); err != nil { 5106 + return err 5107 + } 5108 + 5109 + if err := cbg.WriteBool(w, t.Tags); err != nil { 5094 5110 return err 5095 5111 } 5096 5112 ··· 5190 5206 t.Skip = false 5191 5207 case 21: 5192 5208 t.Skip = true 5209 + default: 5210 + return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) 5211 + } 5212 + // t.Tags (bool) (bool) 5213 + case "tags": 5214 + 5215 + maj, extra, err = cr.ReadHeader() 5216 + if err != nil { 5217 + return err 5218 + } 5219 + if maj != cbg.MajOther { 5220 + return fmt.Errorf("booleans must be major type 7") 5221 + } 5222 + switch extra { 5223 + case 20: 5224 + t.Tags = false 5225 + case 21: 5226 + t.Tags = true 5193 5227 default: 5194 5228 return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) 5195 5229 }
+1
api/tangled/tangledpipeline.go
··· 27 27 Depth int64 `json:"depth" cborgen:"depth"` 28 28 Skip bool `json:"skip" cborgen:"skip"` 29 29 Submodules bool `json:"submodules" cborgen:"submodules"` 30 + Tags bool `json:"tags" cborgen:"tags"` 30 31 } 31 32 32 33 // Pipeline_ManualTriggerData is a "manualTriggerData" in the sh.tangled.pipeline schema.
+1 -1
flake.nix
··· 482 482 find api/tangled/*.go -not -name "cbor_gen.go" -exec \ 483 483 sed -i '/^func.*\(MarshalCBOR\|UnmarshalCBOR\)/,/^}/ s/^/\/\/ /' {} + 484 484 ${pkgs.gotools}/bin/goimports -w api/tangled/* 485 - go run ./cmd/cborgen/ 485 + CGO_ENABLED=0 go run ./cmd/cborgen/ 486 486 lexgen --build-file lexicon-build-config.json lexicons 487 487 rm api/tangled/*.bak 488 488 '';
+5 -1
lexicons/pipeline/pipeline.json
··· 178 178 "required": [ 179 179 "skip", 180 180 "depth", 181 - "submodules" 181 + "submodules", 182 + "tags" 182 183 ], 183 184 "properties": { 184 185 "skip": { ··· 188 189 "type": "integer" 189 190 }, 190 191 "submodules": { 192 + "type": "boolean" 193 + }, 194 + "tags": { 191 195 "type": "boolean" 192 196 } 193 197 }
+5
spindle/models/clone.go
··· 140 140 args = append(args, "--recurse-submodules=yes") 141 141 } 142 142 143 + // Add tags if requested 144 + if clone.Tags { 145 + args = append(args, "--tags") 146 + } 147 + 143 148 // Add remote and SHA 144 149 args = append(args, "origin") 145 150 if sha != "" {
+13 -8
workflow/compile.go
··· 151 151 } 152 152 153 153 func (compiler *Compiler) analyzeCloneOptions(w Workflow) { 154 - if w.CloneOpts.Skip && w.CloneOpts.IncludeSubmodules { 155 - compiler.Diagnostics.AddWarning( 156 - w.Name, 157 - InvalidConfiguration, 158 - "cannot apply `clone.skip` and `clone.submodules`", 159 - ) 154 + if !w.CloneOpts.Skip { 155 + return 160 156 } 161 157 162 - if w.CloneOpts.Skip && w.CloneOpts.Depth > 0 { 158 + warn := func(key string) { 163 159 compiler.Diagnostics.AddWarning( 164 160 w.Name, 165 161 InvalidConfiguration, 166 - "cannot apply `clone.skip` and `clone.depth`", 162 + fmt.Sprintf("cannot apply `clone.skip` and `clone.%s`", key), 167 163 ) 164 + } 165 + if w.CloneOpts.Tags != nil { 166 + warn("tags") 167 + } 168 + if w.CloneOpts.IncludeSubmodules != nil { 169 + warn("submodules") 170 + } 171 + if w.CloneOpts.Depth > 0 { 172 + warn("depth") 168 173 } 169 174 }
+6 -4
workflow/def.go
··· 40 40 } 41 41 42 42 CloneOpts struct { 43 - Skip bool `yaml:"skip"` 44 - Depth int `yaml:"depth"` 45 - IncludeSubmodules bool `yaml:"submodules"` 43 + Skip bool `yaml:"skip"` 44 + Depth int `yaml:"depth"` 45 + IncludeSubmodules *bool `yaml:"submodules"` 46 + Tags *bool `yaml:"tags"` 46 47 } 47 48 48 49 StringList []string ··· 237 238 return tangled.Pipeline_CloneOpts{ 238 239 Depth: int64(c.Depth), 239 240 Skip: c.Skip, 240 - Submodules: c.IncludeSubmodules, 241 + Submodules: c.IncludeSubmodules == nil || *c.IncludeSubmodules, 242 + Tags: c.Tags == nil || *c.Tags, 241 243 } 242 244 }