Skip to content

Commit 19f093c

Browse files
committed
Update action yml and test
1 parent e5cd750 commit 19f093c

File tree

2 files changed

+4
-65
lines changed

2 files changed

+4
-65
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,13 @@ jobs:
1515
pip install pre-commit
1616
pre-commit run --all-files
1717
- name: Test action
18-
uses: Scientific-Python-Translations/translations-sync@main
18+
uses: Scientific-Python-Translations/clean-up@main
1919
env:
2020
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2121
with:
2222
# Provided by user
23-
crowdin-project: "NumPy.Org"
24-
source-repo: "numpy/numpy.org"
25-
source-folder: "numpy.org/content/en/"
26-
source-ref: "main"
27-
translations-repo: "Scientific-Python-Translations/numpy.org-translations"
28-
translations-folder: "numpy.org-translations/content/en/"
23+
translations-repo: "Scientific-Python-Translations/clean-up"
2924
translations-ref: "main"
30-
translation-percentage: "90"
31-
approval-percentage: "0"
32-
use-precommit: "true"
3325
# Provided by organization secrets
3426
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
3527
passphrase: ${{ secrets.PASSPHRASE }}

action.yml

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,13 @@
1-
name: "Create Language Translation PR"
2-
description: "Create a translation PR for a Scientific Python Project"
1+
name: "clean-up"
2+
description: "Create clean up actions on translation repositories"
33
author: "@goanpeca"
44
inputs:
5-
source-repo:
6-
description: "Source repository"
7-
required: true
8-
source-path:
9-
description: "Source folder"
10-
required: true
11-
source-ref:
12-
description: "Source reference"
13-
default: "main"
145
translations-repo:
156
description: "Translations repository"
167
required: true
17-
translations-path:
18-
description: "This is the folder in the translations repo where all the content will be copied to."
19-
required: true
20-
translations-source-path:
21-
description: "This is the folder in the translations repo where all the content will be copied to."
22-
required: true
238
translations-ref:
249
description: "Translations reference"
2510
default: "main"
26-
translation-percentage:
27-
description: "Minimum value of language translation to create a PR e.g. '98'"
28-
required: true
29-
approval-percentage:
30-
description: "Minimum value of language approval to create a PR e.g. '95'"
31-
required: true
32-
use-precommit:
33-
description: "Apply pre-commit before submitting the final PR upstream. Default is 'false'."
34-
default: "false"
35-
create-toml-file:
36-
description: "Create toml file with translators information."
37-
default: "false"
38-
create-upstream-pr:
39-
description: ""
40-
default: "false"
41-
auto-merge:
42-
description: ""
43-
default: "false"
4411
gpg-private-key:
4512
description: "GPG private key of the user/email making the commits"
4613
required: true
@@ -50,12 +17,6 @@ inputs:
5017
token:
5118
description: "Github personal access token of the account performing the github operations"
5219
required: true
53-
crowdin-token:
54-
description: "Crowdin personal access token of the account performing the github operations"
55-
required: true
56-
crowdin-project:
57-
description: "Name of the associated crowdin project. This is used to fetch the latest translators from crowdin. This is case sensitive."
58-
required: true
5920
runs:
6021
using: "composite"
6122
steps:
@@ -83,25 +44,11 @@ runs:
8344
- name: Run scripts
8445
shell: bash
8546
env:
86-
INPUT_SOURCE-REPO: ${{ inputs.SOURCE-REPO }}
87-
INPUT_SOURCE-PATH: ${{ inputs.SOURCE-PATH }}
88-
INPUT_SOURCE-REF: ${{ inputs.SOURCE-REF }}
8947
INPUT_TRANSLATIONS-REPO: ${{ inputs.TRANSLATIONS-REPO }}
90-
INPUT_TRANSLATIONS-PATH: ${{ inputs.TRANSLATIONS-PATH }}
91-
INPUT_TRANSLATIONS-SOURCE-PATH: ${{ inputs.TRANSLATIONS-SOURCE-PATH }}
9248
INPUT_TRANSLATIONS-REF: ${{ inputs.TRANSLATIONS-REF }}
93-
INPUT_CROWDIN-PROJECT: ${{ inputs.CROWDIN-PROJECT }}
94-
INPUT_APPROVAL-PERCENTAGE: ${{ inputs.APPROVAL-PERCENTAGE }}
95-
INPUT_TRANSLATION-PERCENTAGE: ${{ inputs.TRANSLATION-PERCENTAGE }}
96-
INPUT_USE-PRECOMMIT: ${{ inputs.USE-PRECOMMIT }}
97-
INPUT_CREATE-TOML-FILE: ${{ inputs.CREATE-TOML-FILE }}
98-
INPUT_CREATE-UPSTREAM-PR: ${{ inputs.CREATE-UPSTREAM-PR }}
99-
INPUT_AUTO-MERGE: ${{ inputs.AUTO-MERGE }}
10049
GPG_NAME: ${{ steps.import-gpg.outputs.name }}
10150
GPG_EMAIL: ${{ steps.import-gpg.outputs.email }}
10251
TOKEN: ${{ inputs.TOKEN }}
103-
CROWDIN_TOKEN: ${{ inputs.CROWDIN-TOKEN }}
104-
CROWDIN_PROJECT: ${{ inputs.CROWDIN-PROJECT }}
10552
run: |
10653
python -m pip install --upgrade pip
10754
python -m pip install crowdin-api-client python-dotenv pre-commit pygithub requests

0 commit comments

Comments
 (0)