Skip to content

[workr] Snapshot silently skips packages that use inst/workflows (plural) #45

@zdz2101

Description

@zdz2101

Current Behavior

pull_workflows in R/utils-workflows.R hardcodes the directory name "inst/workflow". Packages that store their YAMLs under inst/workflows (plural) — at least grail, grail.ado, gsm.rrm — are not detected. The action logs "No inst/workflow found … skipping" and exits 0, producing an incomplete workflows/ tree.

Expected Behavior

pull_workflows should try both inst/workflow and inst/workflows for each package. Only when both return empty should it log "no workflows".

Possible Solution

Wrap the existing gh_list_contents(full_repo, "inst/workflow", sha) call in a loop over c("inst/workflow", "inst/workflows"), taking whichever first returns a non-NULL listing.

Steps to Reproduce

  1. Run workr::pkgManifest() against a packages.yaml that includes Gilead-BioStats/grail.
  2. Inspect the produced workflows/ tree.
  3. Confirm no YAMLs from grail are present.
  4. Cross-reference upstream: gh api repos/Gilead-BioStats/grail/contents/inst/workflows returns content.

Context

Affects every snapshot produced by workr/main. Has been invisible because nobody had ground truth on workflow counts per package.

QC Approach

Related

Part of the gismo.library snapshot pipeline requirement: Gilead-BioStats/gsm.roadmap#20 (Theme B)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status

Development

Relationships

None yet

Development

No branches or pull requests

Issue actions