Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: allow to fetch for all workflows #27

Closed
yarikoptic opened this issue Apr 27, 2021 · 0 comments · Fixed by #36
Closed

github: allow to fetch for all workflows #27

yarikoptic opened this issue Apr 27, 2021 · 0 comments · Fixed by #36
Assignees

Comments

@yarikoptic
Copy link
Member

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",
yarikoptic added a commit that referenced this issue Apr 28, 2021
Make `workflows` optional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants