Skip to content

Commit

Permalink
Merge pull request #2560 from opral/niklasbuchfink/ninja-19-add-githu…
Browse files Browse the repository at this point in the history
…b-permissions-settings-note-to-readme

fixes: NINJA-19 add GitHub permissions note to Ninja doc
  • Loading branch information
NiklasBuchfink authored Apr 10, 2024
2 parents aeb98f8 + 965a1a1 commit 21b72e7
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 11 deletions.
35 changes: 25 additions & 10 deletions inlang/source-code/github-lint-action/MARKETPLACE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,33 @@ Ensure that your i18n files are always up to date with the latest changes in you
- Comment creation with issue report
- Link creation to fix issues directly in [Fink localization editor](https://inlang.com/m/tdozzpar/app-inlang-finkLocalizationEditor)

## Workflow

<doc-video src="https://cdn.jsdelivr.net/gh/opral/monorepo@latest/inlang/source-code/github-lint-action/assets/Ninja-showcase.mp4"></doc-video>

- When a pull request is opened or updated, the action will run and check for new i18n issues.
- If issues are found, the action creates a comment on the pull request with an issues report including links to the Fink localization editor to resolve the issues.
- After the issues are resolved, the action will automatically update the pull request comment to reflect the changes.
- If no issues are found, the action will simply not create any comments.

## Getting Started

Please ensure you have set up an [inlang project](https://inlang.com//documentation/concept/project) with [lint rules](https://inlang.com/c/lint-rules) in your repository.
**Please make sure that:**
- you have set up an [inlang project](https://inlang.com//documentation/concept/project) with [lint rules](https://inlang.com/c/lint-rules) in your repository
- you have activated actions for your repository:

1. On GitHub.com, navigate to the main page of the repository
2. Click **Actions** tab
3. Click the button **Enable Actions on this repository**
- actions and workflows are allowed in your repository:

1. On GitHub.com, navigate to the main page of the repository
2. Click **Settings** tab
3. Click **Actions** in the left sidebar, then click **General**
4. Select the desired option (e.g. **Allow all actions and workflows**) under **Actions permissions**
5. Click **Save** to apply the settings

<br>

Add the following workflow file to your repository in this path `.github/workflows/ninja_i18n.yml`

Expand Down Expand Up @@ -64,12 +88,3 @@ Create a pull request with changes to your i18n files and see if the action runs
| Name | Requirement | Description |
| --------------------- | ----------- | ----------- |
| `GITHUB_TOKEN` | _required_ | Usage: `GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}`, Ninja i18n action uses this in-built GitHub token to make the API calls for interacting with GitHub. It is built into Github Actions and does not need to be manually specified in your secrets store. [More Info](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)|

## Workflow

<doc-video src="https://cdn.jsdelivr.net/gh/opral/monorepo@latest/inlang/source-code/github-lint-action/assets/Ninja-showcase.mp4"></doc-video>

- When a pull request is opened or updated, the action will run and check for new i18n issues.
- If issues are found, the action creates a comment on the pull request with an issues report including links to the Fink localization editor to resolve the issues.
- After the issues are resolved, the action will automatically update the pull request comment to reflect the changes.
- If no issues are found, the action will simply not create any comments.
18 changes: 17 additions & 1 deletion inlang/source-code/github-lint-action/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,23 @@ https://github.com/opral/monorepo/assets/59048346/99049121-11db-4672-a7a8-e0d606

## Getting Started

Please ensure you have set up an [inlang project](https://inlang.com//documentation/concept/project) with [lint rules](https://inlang.com/c/lint-rules) in your repository.
**Please make sure that:**
- you have set up an [inlang project](https://inlang.com//documentation/concept/project) with [lint rules](https://inlang.com/c/lint-rules) in your repository
- you have activated actions for your repository:

1. On GitHub.com, navigate to the main page of the repository
2. Click **Actions** tab
3. Click the button **Enable Actions on this repository**

- actions and workflows are allowed in your repository:

1. On GitHub.com, navigate to the main page of the repository
2. Click **Settings** tab
3. Click **Actions** in the left sidebar, then click **General**
4. Select the desired option (e.g. **Allow all actions and workflows**) under **Actions permissions**
5. Click **Save** to apply the settings

<br>

Add the following workflow file to your repository in this path `.github/workflows/ninja_i18n.yml`

Expand Down

0 comments on commit 21b72e7

Please sign in to comment.