# Create GitHub Issue

> Streamlining Crowdin Issue Forwarding to GitHub Repositories

URL: https://store.crowdin.com/create-github-issue
Identifier: create-github-issue
Category: Development
Type: Guide
Author: Andrii Bodnar

This guide describes the process of forwarding Crowdin issues to a GitHub repository, improving collaboration between translators and developers. Learn how to configure the integration, report issues effectively, transfer them to GitHub, collaborate on resolutions, and close the loop for seamless localization workflow.

## Setup

1. Generate a GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with the `repo` scope selected. 

2. Set up a Webhook in your crowdin.com or Crowdin Enterprise project:

![](https://developers.app.crowdin.net/api/media/file/72bc6fe5-ee96-4022-b33d-90930e802c97.png)

**Payload:**

```yml
{
  "event_type": "{{event}}",
  "client_payload": {
    "comment": {
      "id": "{{commentId}}",
      "text": "{{commentText}}",
      "type": "{{commentType}}",
      "issueType": "{{commentIssueType}}",
      "issueStatus": "{{commentIssueStatus}}",
      "string": {
        "id": "{{stringId}}",
        "identifier": "{{stringIdentifier}}",
        "key": "{{stringKey}}",
        "text": "{{stringText}}",
        "url": "{{stringUrl}}",
        "file": {
          "id": "{{fileId}}",
          "name": "{{fileName}}",
          "path": "{{filePath}}"
        },
        "project": {
          "id": "{{projectId}}",
          "identifier": "{{projectIdentifier}}",
          "name": "{{projectName}}",
          "url": "{{projectUrl}}"
        }
      },
      "user": {
        "id": "{{userId}}",
        "username": "{{userUsername}}",
        "fullName": "{{userFullName}}",
        "avatarUrl": "{{userAvatarUrl}}"
      }
    }
  }
}
```

**Note!** Be sure to configure the request headers for the webhook: `Authorization: Bearer your_gh_personal_access_token`, `Accept: application/vnd.github.v3+json`

3. Create a yml worfklow in your GitHub repository in the `.github/workflows` directory with the following content:

```yml
name: 'Sync Crowdin Issue'

on:
  repository_dispatch:
    types: [stringComment.created]

permissions:
  contents: read
  issues: write

jobs:
  create-issue:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Create an issue
        if: github.event.client_payload.comment.issueType == 'source_mistake'
        uses: actions-cool/issues-helper@v3
        with:
          actions: 'create-issue'
          token: ${{ secrets.GITHUB_TOKEN }}
          title: 'Mistake in source string ${{ github.event.client_payload.comment.string.identifier }}'
          issue-number: ${{ github.event.client_payload.comment.id }}
          body: |
            The source string '${{ github.event.client_payload.comment.string.identifier }}' contains a mistake.

            > ${{ github.event.client_payload.comment.text }}

            [View in Crowdin](${{ github.event.client_payload.comment.string.url }})
```

The above workflow is triggered every time a new string comment is created in the Crowdin project. If the created comment is an issue and it is of type `source_mistake`, it will create an issue in the repository to notify the developers about this. You can configure the issue body in any way you like.

## Resources

- [Crowdin Webhooks](https://support.crowdin.com/webhooks/)
- [Crowdin Enterprise Webhooks](https://support.crowdin.com/enterprise/overview/)
- [Webhook events](https://developer.crowdin.com/webhooks/)
- [Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
