From 645684df152b8fc8eb2b5532508f385f61e2477e Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Wed, 7 Feb 2024 17:22:39 +0000 Subject: [PATCH] I18n: Add crowdin PRs to project board (#82100) * Revert all previous changes to the workflow Revert "I18n: Add pr to project board (#82096)" This reverts commit 30730ebdd8bf298c88570d91a07ba6d62b52dfa6. Revert "I18n: Fix workflow for adding PR to project board (#82078)" This reverts commit c16cb7ed3c98aea12a98ebefd485bec16d6d6e12. Revert "I18n: Use correct project and pull request ID (#82070)" This reverts commit 10a130191fc7acb21c321c51c5addfbc202f405c. Revert "Fix incorrect quotes in crowdin-download github action (#82063)" This reverts commit 945e26516b8ed64cfef60ac6744b0fe193884460. Revert "I18n: Add crowdin PRs to project board (#82059)" This reverts commit 5b9b990220a83cafeec6dd77aa6ef1064ef27ee5. * Add crowdin pr to frontend platform project board * refactor: clean up first trial --------- Co-authored-by: Laura Benz --- .github/pr-commands.json | 10 +--------- .github/workflows/i18n-crowdin-download.yml | 10 ++++------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/pr-commands.json b/.github/pr-commands.json index 29f3cc94782..8631c92fcb3 100644 --- a/.github/pr-commands.json +++ b/.github/pr-commands.json @@ -192,7 +192,7 @@ "type": "author", "name": "pr/external", "notMemberOf": { "org": "grafana" }, - "ignoreList": ["renovate[bot]","dependabot[bot]","grafana-delivery-bot[bot]","grafanabot","github-actions[bot]"], + "ignoreList": ["renovate[bot]","dependabot[bot]","grafana-delivery-bot[bot]","grafanabot"], "action": "updateLabel", "addLabel": "pr/external" }, @@ -455,13 +455,5 @@ "addToProject": { "url": "https://github.com/orgs/grafana/projects/56" } - }, - { - "type": "changedfiles", - "matches": ["public/locales/de-DE/grafana.json", "public/locales/es-ES/grafana.json", "public/locales/fr-FR/grafana.json", "public/locales/zh-Hans/grafana.json"], - "action": "addToProject", - "addToProject": { - "url": "https://github.com/orgs/grafana/projects/78" - } } ] diff --git a/.github/workflows/i18n-crowdin-download.yml b/.github/workflows/i18n-crowdin-download.yml index 1aada365b81..49af5a618d5 100644 --- a/.github/workflows/i18n-crowdin-download.yml +++ b/.github/workflows/i18n-crowdin-download.yml @@ -57,7 +57,6 @@ jobs: CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} - # App is not available in test repo - name: Generate token if: steps.crowdin-download.outputs.pull_request_url id: generate_token @@ -95,12 +94,14 @@ jobs: } } env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} - name: Add to project board uses: octokit/graphql-action@v2.x if: steps.crowdin-download.outputs.pull_request_url with: + projectid: ${{ fromJson(steps.get-project-id.outputs.data).organization.projectV2.id }} + prid: ${{ env.PULL_REQUEST_ID }} query: | mutation addPullRequestToProject($projectid: ID!, $prid: ID!){ addProjectV2ItemById(input: {projectId: $projectid, contentId: $prid}) { @@ -109,9 +110,6 @@ jobs: } } } - variables: | - projectid: ${{ fromJson(steps.get-project-id.outputs.data).organization.projectV2.id }} - prid: ${{ env.PULL_REQUEST_ID }} + env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} -