From f5dfe26e3e4f90f4d1003ffe256d72fba89c9cea Mon Sep 17 00:00:00 2001 From: Ege Akman Date: Sat, 14 Jan 2023 23:34:10 +0300 Subject: [PATCH 1/7] Update wrap_branch.yml --- .github/workflows/wrap_branch.yml | 56 ++++++------------------------- 1 file changed, 11 insertions(+), 45 deletions(-) diff --git a/.github/workflows/wrap_branch.yml b/.github/workflows/wrap_branch.yml index a3eb570f6..4d368230a 100644 --- a/.github/workflows/wrap_branch.yml +++ b/.github/workflows/wrap_branch.yml @@ -1,75 +1,41 @@ -name: "Wrap all po files in branch" +name: "Wrap All" -on: workflow_dispatch +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' jobs: wrap: runs-on: ubuntu-latest steps: - # Checkout the latest code from the repo - name: Checkout repo uses: actions/checkout@v3 - # Setup which version of Python to use - name: Set Up Python 3.11 uses: actions/setup-python@v4 with: python-version: "3.11" - # Update pip + # Upgrade pip - name: Update pip run: python -m pip install --upgrade pip - # Install requirements. - - name: Install requirements - run: python -m pip install --upgrade -r requirements.txt - # Install dependencies - name: Install dependencies - run: sudo apt install -y gettext + run: python -m pip install --upgrade -r requirements.txt && sudo apt install -y gettext # Wrap all po files - name: Wrap run: powrap *.po */*.po - - name: Sphinx lint - run: | - sphinx-lint *.po */*.po - - # Detect changed files - - name: Detect changed files - run: echo "WRAPPED=$(git diff --name-only | tr '\n' ' ')" >> $GITHUB_ENV - - # Commit changes - - name: Commit changes - run: | - array=($WRAPPED) - len=${#array[@]} - if [[ $len -eq 0 ]]; then - echo "No files to commit" - echo "WRAPPED=False" >> $GITHUB_ENV - else - echo "Committing changes" - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git add ${WRAPPED} - git commit -m "Wrap translations" - echo "WRAPPED=True" >> $GITHUB_ENV - fi - # Create pull request - name: Create Pull Request - id: cpr - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v4.2.3 with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update report - committer: GitHub - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - signoff: false - branch: ${{ github.ref_name }}_wrapped + commit-message: 'Wrap all files on: ${{ github.ref_name }}' + branch: ${{ github.ref_name }}-wrapped delete-branch: true title: 'Wrap branch: ${{ github.ref_name }}' - body: Wrapped all translations on branch ${{ github.ref_name }}. + body: 'Wrapped all files on branch: ${{ github.ref_name }}.' labels: wrap - draft: false From 49248f50446e5dc1140dbdcbabda5f4f01b42cc1 Mon Sep 17 00:00:00 2001 From: Ege Akman Date: Sat, 14 Jan 2023 23:40:54 +0300 Subject: [PATCH 2/7] disrupt file for wrap testing --- about.po | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/about.po b/about.po index d9ef2a42b..fead28e0f 100644 --- a/about.po +++ b/about.po @@ -27,8 +27,7 @@ msgid "" "a document processor specifically written for the Python documentation." msgstr "" "Bu dokümanlar, Python dokümanları için özel olarak yazılmış bir doküman " -"işlemcisi olan `Sphinx`_ tarafından `reStructuredText`_ kaynaklarından " -"oluşturulur." +"işlemcisi olan `Sphinx`_ tarafından `reStructuredText`_ kaynaklarından oluşturulur." #: about.rst:15 msgid "" From 8d9889c0a0820da7ac8720aa365d4520888ac222 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 14 Jan 2023 23:42:57 +0300 Subject: [PATCH 3/7] Wrap all files on: 3.11 (#1) Co-authored-by: egeakman --- about.po | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/about.po b/about.po index fead28e0f..d9ef2a42b 100644 --- a/about.po +++ b/about.po @@ -27,7 +27,8 @@ msgid "" "a document processor specifically written for the Python documentation." msgstr "" "Bu dokümanlar, Python dokümanları için özel olarak yazılmış bir doküman " -"işlemcisi olan `Sphinx`_ tarafından `reStructuredText`_ kaynaklarından oluşturulur." +"işlemcisi olan `Sphinx`_ tarafından `reStructuredText`_ kaynaklarından " +"oluşturulur." #: about.rst:15 msgid "" From 9353c763172c62b9e76339cc6fd8ad36f91f153e Mon Sep 17 00:00:00 2001 From: Ege Akman Date: Sat, 14 Jan 2023 23:48:58 +0300 Subject: [PATCH 4/7] Update wrap_branch.yml --- .github/workflows/wrap_branch.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wrap_branch.yml b/.github/workflows/wrap_branch.yml index 4d368230a..9e33150c7 100644 --- a/.github/workflows/wrap_branch.yml +++ b/.github/workflows/wrap_branch.yml @@ -35,7 +35,9 @@ jobs: with: commit-message: 'Wrap all files on: ${{ github.ref_name }}' branch: ${{ github.ref_name }}-wrapped - delete-branch: true + committer: github-actions[bot] + author: github-actions[bot] title: 'Wrap branch: ${{ github.ref_name }}' body: 'Wrapped all files on branch: ${{ github.ref_name }}.' labels: wrap + delete-branch: true From 312edc3fc6e164a202f07d7be7f82ee887cd319f Mon Sep 17 00:00:00 2001 From: Ege Akman Date: Sat, 14 Jan 2023 23:49:23 +0300 Subject: [PATCH 5/7] Update about.po --- about.po | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/about.po b/about.po index d9ef2a42b..fead28e0f 100644 --- a/about.po +++ b/about.po @@ -27,8 +27,7 @@ msgid "" "a document processor specifically written for the Python documentation." msgstr "" "Bu dokümanlar, Python dokümanları için özel olarak yazılmış bir doküman " -"işlemcisi olan `Sphinx`_ tarafından `reStructuredText`_ kaynaklarından " -"oluşturulur." +"işlemcisi olan `Sphinx`_ tarafından `reStructuredText`_ kaynaklarından oluşturulur." #: about.rst:15 msgid "" From 4a9b573f720ac9479ac7ca747812ba7bbc250816 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 14 Jan 2023 23:51:31 +0300 Subject: [PATCH 6/7] Wrap all files on: 3.11 (#2) Co-authored-by: github-actions[bot] --- about.po | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/about.po b/about.po index fead28e0f..d9ef2a42b 100644 --- a/about.po +++ b/about.po @@ -27,7 +27,8 @@ msgid "" "a document processor specifically written for the Python documentation." msgstr "" "Bu dokümanlar, Python dokümanları için özel olarak yazılmış bir doküman " -"işlemcisi olan `Sphinx`_ tarafından `reStructuredText`_ kaynaklarından oluşturulur." +"işlemcisi olan `Sphinx`_ tarafından `reStructuredText`_ kaynaklarından " +"oluşturulur." #: about.rst:15 msgid "" From 89b2ffb4ed08ca0e3ae28fbb1bcd7e0d858e8323 Mon Sep 17 00:00:00 2001 From: Ege Akman Date: Sat, 14 Jan 2023 23:59:37 +0300 Subject: [PATCH 7/7] Update wrap_branch.yml --- .github/workflows/wrap_branch.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wrap_branch.yml b/.github/workflows/wrap_branch.yml index 9e33150c7..11b6e9b21 100644 --- a/.github/workflows/wrap_branch.yml +++ b/.github/workflows/wrap_branch.yml @@ -3,7 +3,7 @@ name: "Wrap All" on: workflow_dispatch: schedule: - - cron: '0 0 1 * *' + - cron: '0 0 15 * *' jobs: wrap: @@ -18,7 +18,7 @@ jobs: python-version: "3.11" # Upgrade pip - - name: Update pip + - name: Upgrade pip run: python -m pip install --upgrade pip # Install dependencies @@ -35,9 +35,12 @@ jobs: with: commit-message: 'Wrap all files on: ${{ github.ref_name }}' branch: ${{ github.ref_name }}-wrapped + delete-branch: true committer: github-actions[bot] author: github-actions[bot] title: 'Wrap branch: ${{ github.ref_name }}' body: 'Wrapped all files on branch: ${{ github.ref_name }}.' labels: wrap - delete-branch: true + reviewers: | + egeakman + ardasak