File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Rebase Translation PRs
2+ #
3+ # Install this workflow in the TARGET (translated) repository.
4+ # When a translation-sync PR is merged, this workflow automatically
5+ # rebases other open translation-sync PRs against the updated main branch.
6+ #
7+ # This eliminates merge conflicts caused by multiple upstream PRs
8+ # modifying the same files. See: https://github.com/QuantEcon/action-translation/issues/63
9+ #
10+ # Place this file at: .github/workflows/rebase-translations.yml
11+
12+ name : Rebase Translation PRs
13+
14+ on :
15+ pull_request :
16+ types : [closed]
17+
18+ jobs :
19+ rebase :
20+ # Only run when a translation-sync PR is merged
21+ if : >
22+ github.event.pull_request.merged == true &&
23+ startsWith(github.event.pull_request.head.ref, 'translation-sync-')
24+ runs-on : ubuntu-latest
25+
26+ # Prevent concurrent rebases from overlapping
27+ concurrency :
28+ group : rebase-translations
29+ cancel-in-progress : false
30+
31+ steps :
32+ - name : Rebase conflicted translation PRs
33+ uses : quantecon/action-translation@v0.15
34+ with :
35+ mode : rebase
36+ anthropic-api-key : ${{ secrets.ANTHROPIC_API_KEY }}
37+ github-token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments