From 6851f406ef673af8997148f615025e0812b9a418 Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Tue, 8 Nov 2022 17:53:25 +0100 Subject: [PATCH] Extract and fix trigger for PR auto responses (Translation-PRs) (#3992) * Extract and fix trigger for PR auto responses * Fix permission used for job --- .../workflows/automatic-issue-responses.yml | 13 +--------- .../automatic-pull-request-responses.yml | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/automatic-pull-request-responses.yml diff --git a/.github/workflows/automatic-issue-responses.yml b/.github/workflows/automatic-issue-responses.yml index 16eefb03d22..badc10d3342 100644 --- a/.github/workflows/automatic-issue-responses.yml +++ b/.github/workflows/automatic-issue-responses.yml @@ -1,5 +1,5 @@ --- -name: Automatic responses +name: Automatic issue responses on: issues: types: @@ -62,14 +62,3 @@ jobs: As we haven’t heard from you about this problem in some time, this issue will now be closed. If this happens again or continues to be an problem, please respond to this issue with any additional detail to assist with reproduction and root cause analysis. - # Translation PR / Crowdin - - if: github.event.label.name == 'translation-pr' - name: Translation-PR - uses: peter-evans/close-issue@849549ba7c3a595a064c4b2c56f206ee78f93515 # v2.0.0 - with: - comment: | - We really appreciate you taking the time to improve our translations. - - However we use a translation tool called [Crowdin](https://crowdin.com/) to help manage our localization efforts across many different languages. Our translations can only be updated using Crowdin, so we'll have to close this PR, but would really appreciate if you'd consider joining our awesome translation community over at Crowdin. - - More information can be found in the [localization section](https://contributing.bitwarden.com/contributing/#localization-l10n) of our [Contribution Guidelines](https://contributing.bitwarden.com/contributing/) diff --git a/.github/workflows/automatic-pull-request-responses.yml b/.github/workflows/automatic-pull-request-responses.yml new file mode 100644 index 00000000000..e994c2f59b8 --- /dev/null +++ b/.github/workflows/automatic-pull-request-responses.yml @@ -0,0 +1,24 @@ +--- +name: Automatic pull request responses +on: + pull_request: + types: + - labeled +jobs: + close-issue: + name: 'Close pull request with automatic response' + runs-on: ubuntu-20.04 + permissions: + pull-requests: write + steps: + # Translation PR / Crowdin + - if: github.event.label.name == 'translation-pr' + name: Translation-PR + uses: peter-evans/close-issue@849549ba7c3a595a064c4b2c56f206ee78f93515 # v2.0.0 + with: + comment: | + We really appreciate you taking the time to improve our translations. + + However we use a translation tool called [Crowdin](https://crowdin.com/) to help manage our localization efforts across many different languages. Our translations can only be updated using Crowdin, so we'll have to close this PR, but would really appreciate if you'd consider joining our awesome translation community over at Crowdin. + + More information can be found in the [localization section](https://contributing.bitwarden.com/contributing/#localization-l10n) of our [Contribution Guidelines](https://contributing.bitwarden.com/contributing/)