Forked from ramrodo/create_github_issue_for_kubernetes_website.js
Last active
July 4, 2023 17:05
-
-
Save electrocucaracha/5b274f735adb3465a26673d6c75f578f 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 = process.env.GITHUB_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/" + process.argv[2] | |
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' | |
} | |
}) |
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
{"type": "module"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment