From 01fa924947c5423193ca484336101c4f9dda24a2 Mon Sep 17 00:00:00 2001 From: Andrii Bodnar Date: Thu, 21 Sep 2023 11:06:17 +0300 Subject: [PATCH] docs: improve permissions section --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ed1bb4f..5a08335 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ - +

@@ -18,7 +18,7 @@ A GitHub action to manage and synchronize localization resources with your Crowd [**`Wiki`**](https://github.com/crowdin/github-action/wiki) [![test](https://github.com/crowdin/github-action/actions/workflows/test-action.yml/badge.svg)](https://github.com/crowdin/github-action/actions/workflows/test-action.yml) -[![GitHub Used by](https://img.shields.io/static/v1?label=Used%20by&message=7k&color=brightgreen&logo=github&cacheSeconds=10000)](https://github.com/crowdin/github-action/network/dependents?package_id=UGFja2FnZS0yOTQyNTU3MzA0) +[![GitHub Used by](https://img.shields.io/static/v1?label=Used%20by&message=8k&color=brightgreen&logo=github&cacheSeconds=10000)](https://github.com/crowdin/github-action/network/dependents?package_id=UGFja2FnZS0yOTQyNTU3MzA0) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/crowdin/github-action?cacheSeconds=5000&logo=github)](https://github.com/crowdin/github-action/releases/latest) [![GitHub contributors](https://img.shields.io/github/contributors/crowdin/github-action?cacheSeconds=5000)](https://github.com/crowdin/github-action/graphs/contributors) [![GitHub](https://img.shields.io/github/license/crowdin/github-action?cacheSeconds=50000)](https://github.com/crowdin/github-action/blob/master/LICENSE) @@ -76,9 +76,6 @@ jobs: `secrets.GH_TOKEN` - a GitHub Personal Access Token with the `repo` scope selected (the user should have write access to the repository). -> **Note** -> In case you want to use an [automatic GitHub authentication token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication), you need to assign the [`write` permission to your job](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) and [allow GH Actions to create Pull Requests](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#preventing-github-actions-from-creating-or-approving-pull-requests). - ## Supported options The default action is to upload sources. However, you can set different actions using the "with" options. If you don't want to upload your sources to Crowdin, just set the `upload_sources` option to false. @@ -198,6 +195,12 @@ api_token_env: CROWDIN_PERSONAL_TOKEN When the workflow runs, the real values of your token and project ID will be injected into the config using the secrets in the environment. +## Permissions + +In order to push translations and create pull requests, the Crowdin GitHub Action requires the `GITHUB_TOKEN` to have the write permission on the `content` and `pull-requests`. + +In case you want to use an [automatic GitHub authentication token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication), you need to assign the [`write` permission to your job](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) and [allow GH Actions to create Pull Requests](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#preventing-github-actions-from-creating-or-approving-pull-requests). + ## Contributing If you would like to contribute please read the [Contributing](/CONTRIBUTING.md) guidelines.