Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ramrodo/f5287eac3eeee628252b5c1696718e6f to your computer and use it in GitHub Desktop.
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
// 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