Last active
July 4, 2023 17:03
-
-
Save ramrodo/f5287eac3eeee628252b5c1696718e6f to your computer and use it in GitHub Desktop.
Create GitHub Issue in kubernetes/website repo using GitHub API for Spanish localizations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#create-an-issue | |
import { Octokit } from "octokit"; | |
const GITHUB_TOKEN = "YOUR-TOKEN" | |
const octokit = new Octokit({ | |
auth: GITHUB_TOKEN | |
}); | |
// const file_to_be_translated = "content/en/docs/concepts/architecture/cri.md" | |
const file_to_be_translated = "content/en/docs/reference/glossary/container-runtime-interface.md" | |
const title = `[es] localize ${file_to_be_translated} to Spanish` | |
await octokit.request('POST /repos/kubernetes/website/issues', { | |
owner: 'kubernetes', | |
repo: 'website', | |
title, | |
body: ` | |
**This is a Feature Request** | |
**What would you like to be added** | |
Localize \`${file_to_be_translated}\` to Spanish | |
**Why is this needed** | |
There is no Spanish localization for this file. | |
**Comments** | |
/triage accepted | |
/kind feature | |
/language es | |
/sig docs | |
`, | |
assignees: [], | |
labels: [], | |
headers: { | |
'X-GitHub-Api-Version': '2022-11-28' | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment