Create gh action for creating translation issues (#674)

* Create gh action for creating translation issues

* Add template body & label check to translation gh

* Update .github/workflows/translation.yml

Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
This commit is contained in:
Michael S 2022-07-12 12:02:12 +03:00 committed by GitHub
parent e4a1ad36e6
commit aeaa00c421
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,13 @@
---
title: Translation needed for {{'#'}}{{env.PR_NUMBER}}
---
The docs have been updated in PR {{'#'}}{{env.PR_NUMBER}}. The translations should be updated if required.
Languages:
- [ ] English
- [ ] Chinese
- [ ] German
- [ ] Dutch
Assigned to @vapor/translations - please submit a PR with the relevant updates and check the box once merged. Please ensure you tag your PR with the `translation-update` so it doesn't create a new issue!

26
.github/workflows/translation.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Check PR and create issue for translation
on:
push:
branches:
- main
jobs:
create:
name: Create issue
runs-on: ubuntu-latest
steps:
- name: Find PR
uses: 8BitJonny/gh-get-current-pr@2.1.0
id: find-pr
with:
state: all
- uses: actions/checkout@v2
- name: Create issue
if: steps.find-pr.outputs.number && !contains(steps.find-pr.outputs.pr_labels, 'translation-update') && !contains(steps.find-pr.outputs.pr_labels, 'no-translation-needed')
uses: JasonEtco/create-an-issue@v2
env:
PR_NUMBER: ${{ steps.find-pr.outputs.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/workflows/translation-issue-template.md