MCPcopy
hub / github.com/firecow/gitlab-ci-local / getCachePrefix

Method getCachePrefix

src/job.ts:555–566  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

553
554 public async getUniqueCacheName (cwd: string, expanded: {[key: string]: string}, cacheIndex: number) {
555 const getCachePrefix = (index: number) => {
556 const prefix = this.jobData["cache"][index]["key"]["prefix"];
557 if (prefix) {
558 return `${index}_${Utils.expandText(prefix, expanded)}-`;
559 }
560
561 const filenames = this.jobData["cache"][index]["key"]["files"].map((p: string) => {
562 const expandP = Utils.expandText(p, expanded);
563 return expandP.split(".")[0];
564 }).join("_");
565 return `${index}_${filenames}-`;
566 };
567
568 const key = this.jobData["cache"][cacheIndex].key;
569

Callers

nothing calls this directly

Calls 1

expandTextMethod · 0.80

Tested by

no test coverage detected