Skip to content

github: allow to fetch for all workflows #27

@yarikoptic

Description

@yarikoptic
with following config (on top of #23 and #24)
repo: datalad/datalad
ci:
  github:
    path: '{year}/{month}//{day}/{type}/{type_id}/{commit}/{ci}/{wf_name}/{number}-{common_status}/'
  travis:
    path: '{year}/{month}//{day}/{type}/{type_id}/{commit}/{ci}/{number}-{common_status}/{job}.txt'
  appveyor:
    path: '{year}/{month}//{day}/{type}/{type_id}/{commit}/{ci}/{number}-{common_status}/{job}.txt'
    accountName: mih
    projectSlug: datalad
since: 2021-04-25T00:00:00Z
types: [cron, pr, push]
#secrets:
  #github: '\b(v1\.)?[a-f0-9]{40}\b'
  #docker-hub: '\b[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}\b'
  #appveyor: '\b(v2\.)?[a-z0-9]{20}\b'
  #travis: '\b[a-zA-Z0-9]{22}\b'
  #aws: '\b[a-zA-Z0-9+/]{40}\b'
datalad:
  enabled: true
  cfg_proc: text2git
tineous errors out
Traceback (most recent call last):
  File "../tinuous/tinuous", line 823, in <module>
    main()
  File "/home/yoh/miniconda3/envs/tinuous/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/yoh/miniconda3/envs/tinuous/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/yoh/miniconda3/envs/tinuous/lib/python3.8/site-packages/click/core.py", line 1256, in invoke
    Command.invoke(self, ctx)
  File "/home/yoh/miniconda3/envs/tinuous/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/yoh/miniconda3/envs/tinuous/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/yoh/miniconda3/envs/tinuous/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "../tinuous/tinuous", line 700, in main
    ctx.obj = Config.parse_obj(safe_load(fp))
  File "pydantic/main.py", line 520, in pydantic.main.BaseModel.parse_obj
  File "pydantic/main.py", line 362, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Config
ci -> github -> workflows
  field required (type=value_error.missing)

In such case all currently available workflows should be considered, there is an API endpoint for that:

$> curl --silent -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/datalad/datalad/actions/workflows | grep 'path'
      "path": ".github/workflows/benchmarks.yml",
      "path": ".github/workflows/docbuild.yml",
      "path": ".github/workflows/test_extensions.yml",
      "path": "",
      "path": ".github/workflows/test_crippled.yml",
      "path": ".github/workflows/update-contributors.yml",
      "path": ".github/workflows/test_macos.yml",
      "path": ".github/workflows/shellcheck.yml",
      "path": ".github/workflows/lint.yml",

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions