-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (79 loc) · 4.1 KB
/
PullLokalise.yml
File metadata and controls
90 lines (79 loc) · 4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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"
custom_github_token: ${{ secrets.GH_PAT }}
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 }}