MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / sh_prow_files

Function sh_prow_files

src/pipeline/pass_shell.c:3897–3918  ·  view source on GitHub ↗

Prow job configs: the files whose top-level keys (YAML Variables) include * presubmits / postsubmits / periodics. */

Source from the content-addressed store, hash-verified

3895/* Prow job configs: the files whose top-level keys (YAML Variables) include
3896 * presubmits / postsubmits / periodics. */
3897static CBMHashTable *sh_prow_files(cbm_pipeline_ctx_t *ctx) {
3898 static const char *const keys[] = {"presubmits", "postsubmits", "periodics", NULL};
3899 CBMHashTable *out = NULL;
3900 for (int k = 0; keys[k]; k++) {
3901 const cbm_gbuf_node_t **nodes = NULL;
3902 int n = 0;
3903 if (cbm_gbuf_find_by_name(ctx->gbuf, keys[k], &nodes, &n) != 0) {
3904 continue;
3905 }
3906 for (int i = 0; i < n; i++) {
3907 const char *fp = nodes[i]->file_path;
3908 if (!fp || !sh_eq(nodes[i]->label, "Variable")) {
3909 continue;
3910 }
3911 out = out ? out : cbm_ht_create(0);
3912 if (out) {
3913 cbm_ht_set(out, fp, (void *)fp);
3914 }
3915 }
3916 }
3917 return out;
3918}
3919
3920/* One script, Makefile or CI configuration `rel` (on disk at `path`). */
3921static void sh_pass_file(sh_pass_t *p, cbm_pipeline_ctx_t *ctx, CBMHashTable *prow, const char *rel,

Callers 1

cbm_pipeline_pass_shellFunction · 0.85

Calls 4

cbm_gbuf_find_by_nameFunction · 0.85
sh_eqFunction · 0.85
cbm_ht_createFunction · 0.85
cbm_ht_setFunction · 0.85

Tested by

no test coverage detected