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 30730ebdd8.

Revert "I18n: Fix workflow for adding PR to project board (#82078)"
This reverts commit c16cb7ed3c.

Revert "I18n: Use correct project and pull request ID (#82070)"
This reverts commit 10a130191f.

Revert "Fix incorrect quotes in crowdin-download github action (#82063)"
This reverts commit 945e26516b.

Revert "I18n: Add crowdin PRs to project board (#82059)"
This reverts commit 5b9b990220.

* Add crowdin pr to frontend platform project board

* refactor: clean up first trial

---------

Co-authored-by: Laura Benz <laura.benz@grafana.com>
This commit is contained in:
Josh Hunt 2024-02-07 17:22:39 +00:00 committed by GitHub
parent 791ead7806
commit 645684df15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 15 deletions

View File

@ -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"
}
}
]

View File

@ -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 }}