Skip to content

chore(ci): refresh vended v3/languages responses hourly#348

Draft
daniel-jones-dev wants to merge 1 commit into
vend-v3-languagesfrom
refresh-v3-languages-action
Draft

chore(ci): refresh vended v3/languages responses hourly#348
daniel-jones-dev wants to merge 1 commit into
vend-v3-languagesfrom
refresh-v3-languages-action

Conversation

@daniel-jones-dev
Copy link
Copy Markdown
Member

Summary

  • New scheduled workflow .github/workflows/refresh-v3-languages.yml.
  • Hourly cron (0 * * * *) plus workflow_dispatch for manual runs.
  • Calls scripts/fetch_v3_languages.py with the DEEPL_API_KEY repo secret bound to DEEPL_AUTH_KEY.
  • peter-evans/create-pull-request@v6 opens a PR against main only when data/v3-languages/** has changed.

Stacked on #347 — base is vend-v3-languages, will retarget to main once that merges.

Before merging

  • Add DEEPL_API_KEY repo secret with a Pro key that can reach https://api.deepl.com/v3/languages.
  • Trigger once via the Actions tab (workflow_dispatch) to verify the PR flow.

Test plan

  • Manual workflow run produces a PR if (and only if) the vended JSON differs from the committed copy.
  • The auto-generated PR contains only files under data/v3-languages/.
  • Subsequent runs reuse the existing branch (chore/refresh-v3-languages) and force-update it.

🤖 Generated with Claude Code

Adds .github/workflows/refresh-v3-languages.yml: an hourly cron (plus
manual workflow_dispatch) that runs scripts/fetch_v3_languages.py
against api.deepl.com using the DEEPL_API_KEY repo secret, then uses
peter-evans/create-pull-request@v6 to open (and update in place) a PR
against main whenever data/v3-languages/** changes.

A concurrency group guards against cron + manual runs racing for the
same branch.

peter-evans behavior on subsequent runs:

- Responses unchanged: the action compares trees, not commit SHAs, so a
  fresh timestamp alone does not cause a push. Branch is left as-is.
- Responses changed: the branch is force-pushed with a new single
  squashed commit so the diff against main always represents the
  current API state in one reviewable chunk.
- Responses now match main (typically right after the PR was merged):
  the action closes the PR and deletes the branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@daniel-jones-dev daniel-jones-dev force-pushed the refresh-v3-languages-action branch from 304b00e to 366cc68 Compare May 20, 2026 08:47
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 this pull request may close these issues.

1 participant