Skip to content

Commit

Permalink
Merge branch 'main' into workbook
Browse files Browse the repository at this point in the history
  • Loading branch information
Felienne committed Sep 20, 2024
2 parents 33330a6 + 62736e3 commit 447bcc5
Show file tree
Hide file tree
Showing 621 changed files with 64,740 additions and 57,812 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/resolve-weblate-conflict.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Prevent updates and merge conflicts until merged
run: |
# Have to lock each component individually. Not in the UI, but using the CLI we do.
for component in glossary adventures keywords achievements quizzes commands client-messages web-texts webpages parsons tutorials slides; do
for component in glossary adventures keywords quizzes commands client-messages web-texts webpages parsons tutorials slides; do
wlc lock hedy/$component
done
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/unlock-weblate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
echo 'https://hosted.weblate.org/api/ = ${{ secrets.WEBLATE_API_KEY }}' >> .weblate
- run: |
# Have to lock each component individually. Not in the UI, but using the CLI we do.
for component in glossary adventures keywords achievements quizzes commands client-messages web-texts webpages parsons tutorials slides; do
wlc unlock hedy/$component
done
set -x
for component in glossary adventures keywords quizzes commands client-messages web-texts webpages parsons tutorials slides; do
wlc --debug unlock hedy/$component | sed 's/${{ secrets.WEBLATE_API_KEY }}/*****/g'
done
echo "All components unlocked!"
35 changes: 31 additions & 4 deletions .github/workflows/update-weblate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,43 @@ jobs:
fi
# Have to lock each component individually. Not in the UI, but using the CLI we do.
for component in glossary adventures keywords achievements quizzes commands client-messages web-texts webpages parsons tutorials slides; do
# (NOTE: this list is also below!)
for component in glossary adventures keywords quizzes commands client-messages web-texts webpages parsons tutorials slides; do
wlc lock hedy/$component
done
wlc pull
# 'commit' seems to be an async process, as sometimes nothing is pushed if we run this
# too quickly in succession. Add a short sleep to reduce chances of this happening.
# https://github.com/WeblateOrg/weblate/issues/12400
wlc commit
sleep 30
wlc push
# On our repo, 'wlc reset' consistently times out the TCP connection after waiting
# for 5 minutes. The actual reset does seem to work, so we just don't wait for the
# command to finish, otherwise all our workflow executions show errors.
sleep 60
- name: Confirm that Weblate created a new PR
run: |
prs=$(gh pr -R hedyorg/hedy list -q '.[] | select(.title | contains("Translations update"))' --json title)
if [[ "$prs" == "" ]]; then
echo "Weblate didn't create a PR! Not resetting because that would lose changes!"
# Unlock each component again so we don't stay locked
# (NOTE: this list is also above!)
for component in glossary adventures keywords quizzes commands client-messages web-texts webpages parsons tutorials slides; do
wlc unlock hedy/$component
done
exit 1
fi
env:
GH_TOKEN: ${{ github.token }}

- name: Make Weblate forget its commits
run: |
# 'wlc reset' always leads to ConnectionAborted, so don't wait for it.
# https://github.com/WeblateOrg/weblate/issues/11368
wlc reset &
sleep 10
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,9 @@ dist/
# hide file_logger.json
file_logger.json
*.tmp

# This file is generated by the flask-commonmark package.
# We submitted a PR to the package, but it's still wating to be approved
# Until then, we can include it in .gitignore
# More info in #4540
foo.txt
11 changes: 5 additions & 6 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ queue_rules:
- name: default_queue
conditions:
- "check-success=build"
merge_method: squash
commit_message_template: |-
{{ title }} (#{{number}})
{{ body }}
pull_request_rules:
- name: Automatic squash merge on approval
Expand All @@ -17,9 +21,4 @@ pull_request_rules:
comment:
message: Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).
queue:
name: default_queue
method: squash
commit_message_template: |-
{{ title }} (#{{number}})
{{ body }}
name: default_queue
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ repos:
hooks:
- id: autopep8
- repo: https://github.com/pycqa/flake8
rev: 7.1.0
rev: 7.1.1
hooks:
- id: flake8
Loading

0 comments on commit 447bcc5

Please sign in to comment.