1+ name : Demo pull with tags
2+
3+ on :
4+ workflow_dispatch :
5+
6+ permissions :
7+ contents : write
8+ pull-requests : write
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout Repo
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Pull from Lokalise
21+ id : lokalise-pull
22+ uses : lokalise/lokalise-pull-action@main
23+ with :
24+ api_token : ${{ secrets.LOKALISE_API_TOKEN }}
25+ project_id : 5868381966b39e5053ff15.63486389
26+ translations_path : messages
27+ # skip_original_filenames: true
28+ skip_include_tags : true
29+ flat_naming : true
30+ file_format : json
31+ pr_teams_reviewers : demo-team
32+ pr_title : Demo
33+ pr_body : " Review that"
34+ additional_params : |
35+ --indentation=2sp
36+ --export-sort=a_z
37+ --replace-breaks=false
38+ --language-mapping=[{"original_language_iso":"ar_AR","custom_language_iso":"ar-AR"},{"original_language_iso":"bn_BD","custom_language_iso":"bn-BD"},{"original_language_iso":"de_DE","custom_language_iso":"de-DE"},{"original_language_iso":"en_CA","custom_language_iso":"en-CA"},{"original_language_iso":"en_GB","custom_language_iso":"en-GB"},{"original_language_iso":"en_US","custom_language_iso":"en-US"},{"original_language_iso":"en","custom_language_iso":"en"},{"original_language_iso":"es_ES","custom_language_iso":"es-ES"},{"original_language_iso":"fa_IR","custom_language_iso":"fa-IR"},{"original_language_iso":"fr_CA","custom_language_iso":"fr-CA"},{"original_language_iso":"fr_FR","custom_language_iso":"fr-FR"},{"original_language_iso":"hi_IN","custom_language_iso":"hi-IN"},{"original_language_iso":"id_ID","custom_language_iso":"id-ID"},{"original_language_iso":"ms_MY","custom_language_iso":"ms-MY"},{"original_language_iso":"nl_NL","custom_language_iso":"nl-NL"},{"original_language_iso":"tr_TR","custom_language_iso":"tr-TR"},{"original_language_iso":"ur_PK","custom_language_iso":"ur-PK"}]
39+
40+
41+ # base_lang: en
42+ # file_format: json
43+ # # file_ext: json
44+ # # additional_params: |
45+ # # --directory-prefix=%LANG_ISO%
46+ # # --indentation=4sp
47+ # # --json-unescaped-slashes=true
48+ # # --export-empty-as=skip
49+ # # --export-sort=a_z
50+ # # --replace-breaks=false
51+ # # --language-mapping=[{"original_language_iso":"en_US","custom_language_iso":"en-US"}]
52+ # always_pull_base: true
53+ # flat_naming: true
54+ # skip_include_tags: true
55+ # pr_labels: 'automerge,sample'
56+ # # skip_original_filenames: true
57+ # # async_mode: true
58+ # # override_branch_name: 'custom_branch'
59+ # # force_push: true
60+
61+ - name : Debug Created Branch
62+ run : |
63+ echo "Branch created: ${{ steps.lokalise-pull.outputs.created_branch }}"
64+ echo "PR created: ${{ steps.lokalise-pull.outputs.pr_created }}"
65+ echo "PR id: ${{ steps.lokalise-pull.outputs.pr_id }}"
66+ echo "PR number: ${{ steps.lokalise-pull.outputs.pr_number }}"
67+
68+ # - name: Trigger Automerge Workflow
69+ # if: steps.lokalise-pull.outputs.created_branch != '' && steps.lokalise-pull.outputs.pr_created == 'true'
70+ # uses: actions/github-script@v7
71+ # with:
72+ # github-token: ${{ secrets.PAT_TOKEN }}
73+ # script: |
74+ # await github.rest.actions.createWorkflowDispatch({
75+ # owner: context.repo.owner,
76+ # repo: context.repo.repo,
77+ # workflow_id: "automerge.yml",
78+ # ref: "${{ steps.lokalise-pull.outputs.created_branch }}",
79+ # });
80+
81+ # - name: Inspect Pull Requests
82+ # run: gh pr list --state open --json number,headRefName,labels,baseRefName,title
83+ # env:
84+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
86+ # - name: List All PRs with Merge Status
87+ # run: gh pr list --state open --json number,mergeable,mergeStateStatus,headRefName,baseRefName,labels,title
88+ # env:
89+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
0 commit comments