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

Improve workflows for keeping source content up to date in scientific-python-translations repos #135

Open
steppi opened this issue Jan 23, 2025 · 0 comments
Labels
type: task 📌 A concrete, well-scoped item

Comments

@steppi
Copy link

steppi commented Jan 23, 2025

Summary

The workflows for keeping source content up to date (see https://github.com/Scientific-Python-Translations/pandas-translations/blob/main/.github/workflows/sync.yml for an example) have several drawbacks that would be good to fix.

To avoid requiring project maintainers to deal with Crowdin, we have created separate repos which mirror the source content from the project websites. There are nightly crons which use rsync to update the content, and submit a PR to the respective scientific-python-translations mirror repo if the content has been updated. An annoyance is that this requires keeping up to date with these PRs. If they are not merged, then currently, a fresh one will be created each night. Also, the current design causes a proliferation of branches to be created, but no means to clean them up automatically.

It would be good if:

  1. Key parts of the syncing workflow are abstracted into its own GitHub action for reusability.
  2. The bot in the workflow could sign its commits, so we can merge the pull requests automatically without having to worry about someone spoofing the bot.
  3. Only a single branch is used to avoid the proliferation of branches, and as a fallback in case something goes wrong with the auto-merging or its turned off, at most one PR should be kept open. If the cron runs while another PR is open, the workflow should check if there's been a change with respect to that PR, and only make an update to it if a change was actually made.

Acceptance Criteria

  1. A new GitHub action for the syncing content is created.
  2. A GitHub user is created for the bot, it signs its commits, and its PRs are merged automatically.
  3. Workflow is modified so that at most one related branch per repo is kept open at a time.

Tasks to complete

Tasks listed above.

@goanpeca @trallard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task 📌 A concrete, well-scoped item
Projects
Status: 📬 TODO
Development

No branches or pull requests

1 participant