Demo pull with tags #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Demo pull with tags | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Pull from Lokalise | |
| id: lokalise-pull | |
| uses: lokalise/lokalise-pull-action@add_pr_reviewers | |
| with: | |
| api_token: ${{ secrets.LOKALISE_API_TOKEN }} | |
| project_id: 5868381966b39e5053ff15.63486389 | |
| translations_path: messages | |
| # skip_original_filenames: true | |
| skip_include_tags: true | |
| flat_naming: true | |
| file_format: json | |
| pr_teams_reviewers: demo-team | |
| pr_title: Demo | |
| pr_body: "Review that" | |
| additional_params: | | |
| --indentation=2sp | |
| --export-sort=a_z | |
| --replace-breaks=false | |
| --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"}] | |
| # base_lang: en | |
| # file_format: json | |
| # # file_ext: json | |
| # # additional_params: | | |
| # # --directory-prefix=%LANG_ISO% | |
| # # --indentation=4sp | |
| # # --json-unescaped-slashes=true | |
| # # --export-empty-as=skip | |
| # # --export-sort=a_z | |
| # # --replace-breaks=false | |
| # # --language-mapping=[{"original_language_iso":"en_US","custom_language_iso":"en-US"}] | |
| # always_pull_base: true | |
| # flat_naming: true | |
| # skip_include_tags: true | |
| # pr_labels: 'automerge,sample' | |
| # # skip_original_filenames: true | |
| # # async_mode: true | |
| # # override_branch_name: 'custom_branch' | |
| # # force_push: true | |
| - name: Debug Created Branch | |
| run: | | |
| echo "Branch created: ${{ steps.lokalise-pull.outputs.created_branch }}" | |
| echo "PR created: ${{ steps.lokalise-pull.outputs.pr_created }}" | |
| echo "PR id: ${{ steps.lokalise-pull.outputs.pr_id }}" | |
| echo "PR number: ${{ steps.lokalise-pull.outputs.pr_number }}" | |
| # - name: Trigger Automerge Workflow | |
| # if: steps.lokalise-pull.outputs.created_branch != '' && steps.lokalise-pull.outputs.pr_created == 'true' | |
| # uses: actions/github-script@v7 | |
| # with: | |
| # github-token: ${{ secrets.PAT_TOKEN }} | |
| # script: | | |
| # await github.rest.actions.createWorkflowDispatch({ | |
| # owner: context.repo.owner, | |
| # repo: context.repo.repo, | |
| # workflow_id: "automerge.yml", | |
| # ref: "${{ steps.lokalise-pull.outputs.created_branch }}", | |
| # }); | |
| # - name: Inspect Pull Requests | |
| # run: gh pr list --state open --json number,headRefName,labels,baseRefName,title | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # - name: List All PRs with Merge Status | |
| # run: gh pr list --state open --json number,mergeable,mergeStateStatus,headRefName,baseRefName,labels,title | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |