Skip to content

feat(workflows): Sync workflows while syncing translations - #1020

Merged
nickvergessen merged 2 commits into
masterfrom
feat/noid/automatically-sync-workflows
Nov 4, 2026
Merged

nickvergessen merged 2 commits into
masterfrom
feat/noid/automatically-sync-workflows

Conversation

@nickvergessen

Copy link
Copy Markdown
Member

How

  • The bot shallow-clones nextcloud/.github once. For each branch it already translates, after the translations commit, it runs the same logic as sync-workflow-templates.yml:
  • It only touches workflows the app already has.
  • It compares md5 hashes against .github/actions-lock.txt and creates that file if it's missing.
  • It reapplies any *.yml.patch files.
  • It skips the sync while a merge freeze is active (when the app has block-merge-freeze.yml).

What

  • Nothing changed: the translations are pushed, as before.
  • Patches applied cleanly: a second commit, ci(actions): Update workflow templates…, goes onto the branch and both commits are
    pushed together.
  • A patch failed: the translations are pushed to the branch. The workflow commit is force-pushed to
    automated/noid/-update-workflows, which is the branch name the action uses, so if the action is still enabled in an app
    both end up on the same PR. A draft PR is then opened through the API with the same title and checklist as the action.

Where

  • Mechanism is Opt-In for apps: .github/actions-lock.txt is the opt-in
  • Limited to nextcloud org
  • Temporary limited to nextcloud/spreed repo to test it

Why

  • Currently the workflow creates PRs
  • The PRs can not be automerged as that is not allowed for PRs touching workflow files
  • Currently spams 5 notifications per maintained branch per app, for me it was 5*34 => 170 this weekend

Note

Yes it's abuse to do this on translation sync, but we already loop over all repositories here and cloned them already, so it's the best starting point

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Joas Schilling <coding@schilljs.com>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen
nickvergessen merged commit d2c0cff into master Nov 4, 2026
5 checks passed
@nickvergessen
nickvergessen deleted the feat/noid/automatically-sync-workflows branch November 4, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants