{"id":168676,"date":"2024-12-16T17:18:20","date_gmt":"2024-12-16T08:18:20","guid":{"rendered":"https:\/\/support.questetra.com\/?p=168676"},"modified":"2024-12-16T17:18:22","modified_gmt":"2024-12-16T08:18:22","slug":"service-task-github-repository-create","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-github-repository-create\/","title":{"rendered":"GitHub: Create Repository"},"content":{"rendered":"\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"58\" data-attachment-id=\"113160\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/how-to-use-timer-start-event\/attachment\/advanced-banner-new-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?fit=1200%2C68&amp;ssl=1\" data-orig-size=\"1200,68\" data-comments-opened=\"0\" data-image-title=\"advanced-banner-new-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?fit=1024%2C58&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en-1024x58.png?resize=1024%2C58&#038;ssl=1\" alt=\"\" class=\"wp-image-113160\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?resize=1024%2C58&amp;ssl=1 1024w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?resize=600%2C34&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?resize=768%2C44&amp;ssl=1 768w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2021\/05\/advanced-banner-new-en.png?w=1200&amp;ssl=1 1200w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading has-border-color has-product-main-border-color has-white-color has-product-main-background-color has-text-color has-background has-link-color\" style=\"border-width:2px;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:var(--wp--preset--spacing--10);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--20)\"><strong>GitHub: Create Repository<\/strong><\/h4>\n\n\n\n<p class=\"has-text-align-right has-border-color has-product-main-border-color has-white-color has-product-main-background-color has-text-color has-background has-link-color has-small-font-size mt-0 pt-0 wp-block-paragraph\" style=\"border-width:2px;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:var(--wp--preset--spacing--20);padding-bottom:0;padding-left:var(--wp--preset--spacing--20)\"><a href=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-github-repository-create\/\">GitHub: \u30ea\u30dd\u30b8\u30c8\u30ea\u4f5c\u6210<\/a><\/p>\n\n\n\n<p class=\"has-border-color has-product-main-border-color has-text-color has-white-background-color has-background has-link-color mt-0 pt-0 wp-block-paragraph\" style=\"border-width:2px;margin-top:0;margin-right:0;margin-bottom:var(--wp--preset--spacing--30);margin-left:0;padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)\">This item creates a repository on GitHub.<\/p>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details open><summary class=\"wp-block-coblocks-accordion-item__title\">Basic Configs<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<dl style=\"0 0 -0.7em 0\">\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #C3C3C3;\"><\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Step Name<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #C3C3C3;\"><\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">Note<\/dd>\n<\/dl>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-image alignright has-custom-border is-style-default\"><img decoding=\"async\" src=\"data:image;base64,\n        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABM9JREFUWEfF\n        V2tQlFUYfs4ugiKgePkTiE3gCIssGWRhg1EwaE2OUZNjVDIFEwyJM12MSZKgokkNUdZNMhwCCg0p\n        Bi8UxGVRblkgLHFJ12ZipImBLiAOg7h7mvfT\/dz99lt2sR+8v3bPe3vOez0fw\/+gqKgoF1LX6XQ3\n        79YMc1bxvuBgP2ZSRjHGH4SJqcCwGsCi2\/pj4PgVCt7HOfuJK4y633p7B52x7RBAgCo0GCYeD4bn\n        AKxyxiiAy+A4CQUrM\/R1986kYxdAWFjYvH8nb6YoOE\/igNpJx1ZiDNCbGCtcvMCloKOjY1rOhiyA\n        ALXal93gb3PG0u7GsVSHca7hrmyfQa+\/asOTHpBzTCMLQKIj5wqFAiaTyZGYmX8M85AlBWEVAQr7\n        +PUbufZu7uvrg+SkV3B\/aAj8VqyAu7u7AGB09C8MXLqEH+oacKK8wi4gioTXQtc3LdNhBcBfFZrG\n        OM+Xs7AjNRlpqSmgW89Evw8OIiExGUNDf8iKccZ2Xunr1piZIgCqdsZ5mbTgvL0Xo7ysFPeu9HM2\n        1EJU9uXm4VhRiY0OFSZnLN7cHXcABKpzwLBbqlH1zddQBQU67dxScGv8dlzs6rbV5fjIMKDPIIYA\n        gIaMwqSsk\/b5i\/Hb8N677wgGJicnsSfrA6S9loKVfn7CLaempqBUKuHq6gqj0Sjkf8H8+Xgmboug\n        MzY2hnWPRMkV6mWTwhhDw0oA4B+k3s6AYkuoi7y80N7cCBcXYdqCchuzabPwe\/nyZRgZGRXFyanS\n        RYmJieuIeGgdSoo+F3nfVlYhPSPTJgocSLjSry8RAASoQjTgbIelVPy2rcjOFKIk0MjoKNZviHaY\n        Crr93pz3Rbmx8XGEPxxpq8f4YUNfT9otAIHqejA8bil1+GAuNsbGiEd0C7qNI6IuudDaBIqgmQJD\n        1sJolMwLjgbDgD76FoAgNU0oH0vjjbXVoL4nonyvXrPWkW+Rn5+3H09sjBX\/U1u2trVL9YcM\/Xpf\n        Riv16vDf\/wDwsJT45eIFuLm5CUdUYIEhDzgN4OOcbDwb97Qor9EWIF97RKo\/YejXe9oF0Ha+AcuW\n        LhWV1j8abVV4M6GpPHkca4JVoshb6btRdfqsPAB7Kag48SVC1SGiErUYtaEjWrLEGy26OrF7SD7y\n        sVj8OTwsnwJ7RUgdQJ1gSY4KkSJGwH187hHV7KbPqghl2pBGcPv5RmH2U89T7xNRO3Z2diEjMxvU\n        YkQ0sOK2bBbCLt0V39XUYufru2wDZ9mGcoOINPI+2YunntyE6elpYcq99MLzgiGacOERG0SjSS8n\n        IH3XGzZOqHvCIyJx7dqEDc9qENkbxR4eC9FUXwMvT090detxvLwCqwL8cfpMNfr6B0SjFJ3Wpnob\n        J3n5WnxacFSubKxH8e06kF1GVFS11aeEwUKjVt\/TA925ZhQVl4qG6V3Q\/XOblSPtkaM4qNHK16x0\n        GQkA7Kxj4lE9fFH4mbgVzzW3IPHVVNG4p6cHOn9sEf7Tgtp\/4BCKS7+SdW53HZP0TA8S4lNbfpi9\n        B1WnzqKw6M7uooX1\/ZlK1NTW4cAhje3YtYBi90FCMo6eZPLxdP7U4ZNMSMUsHqXOuxYkHT9KzQbn\n        9FluBjGnHyaWoZ2zTzNpfufs43SWhTZr8f8AaTovPzYDLOEAAAAASUVORK5CYII=\n    \" alt=\"Auto Step icon\" class=\"has-border-color has-ast-global-color-4-border-color\" style=\"border-width:0.5em\"\/><\/figure>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details open><summary class=\"wp-block-coblocks-accordion-item__title\">Configs for this Auto Step<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<dl style=\"0 0 -0.7em 0\">\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Auth<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C1: Personal Access Token (fine-grained)<span style=\"color:#990000;\"> *<\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Org<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C2: Organization Name (if blank, create the user&#8217;s repository)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Name<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C3: Repository Name<span style=\"color:#990000;\"> *<\/span><span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Visibility<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C4: Visibility<span style=\"color:#990000;\"> *<\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_License<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C5: License<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_GitIgnore<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C6: .gitignore Template (input the name without the extension)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Description<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C7: Description<span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Homepage<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C8: Website<span style=\"color:#000099;\"><sup style=\"font-style:italic;\">#{EL}<\/sup><\/span><\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Topics<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C9: Topics (write one per line)<\/dd>\n<dt style=\"font-weight: 300; font-size: 50%; margin: -1em 0 0 0; color: #aaa;\">conf_Url<\/dt><dd style=\"margin: -0.5em 0 0.1em 1em\">C10: Data item to save the repository&#8217;s URL<\/dd>\n\n<\/dl>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--30)\"><span>Notes<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To learn about how to create your Personal Access Token (fine-grained), see the <a href=\"https:\/\/docs.github.com\/en\/authentication\/keeping-your-account-and-data-secure\/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub documentation<\/a>\n<ul class=\"wp-block-list\">\n<li>To create a repository, the token requires the following permission: Repository permissions &gt; Administration &gt; Read and Write<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>[C5: License] can be set to a fixed value, even if the license is not one of the options\n<ul class=\"wp-block-list\">\n<li>You can input any license keyword listed in the&nbsp;<a href=\"https:\/\/docs.github.com\/en\/repositories\/managing-your-repositorys-settings-and-features\/customizing-your-repository\/licensing-a-repository#searching-github-by-license-type\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub documentation<\/a> as fixed value<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>To set up [C6: .gitignore Template], choose one\u00a0<code>.gitignore<\/code>\u00a0file from the <a href=\"https:\/\/github.com\/github\/gitignore\" target=\"_blank\" rel=\"noreferrer noopener\">gitignore repository<\/a> and input the character string before <code>.gitignore<\/code>\n<ul class=\"wp-block-list\">\n<li>Ex. If you would like to use <code>Node.gitignore<\/code>, input <code>Node<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--30)\"><span>Capture<\/span><\/h3>\n\n\n\n<figure class=\"wp-block-image size-full has-custom-border is-style-rounded is-style-rounded--1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1340\" height=\"1490\" data-attachment-id=\"168677\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/markdown-basic\/attachment\/github-repository-create_capture_en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/github-repository-create_capture_en.png?fit=1340%2C1490&amp;ssl=1\" data-orig-size=\"1340,1490\" data-comments-opened=\"0\" data-image-title=\"github-repository-create_capture_en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/github-repository-create_capture_en.png?fit=567%2C630&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/github-repository-create_capture_en.png?resize=1340%2C1490&#038;ssl=1\" alt=\"\" class=\"has-border-color wp-image-168677\" style=\"border-color:#009900;border-width:3px;border-radius:9px\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/github-repository-create_capture_en.png?w=1340&amp;ssl=1 1340w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/github-repository-create_capture_en.png?resize=283%2C315&amp;ssl=1 283w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/github-repository-create_capture_en.png?resize=567%2C630&amp;ssl=1 567w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/github-repository-create_capture_en.png?resize=768%2C854&amp;ssl=1 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"margin-top:var(--wp--preset--spacing--30)\"><span>See also<\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/support.questetra.com\/en\/bpmn-icons\/intermediate-error-catch-event-boundary-type\/\" target=\"_blank\" rel=\"noreferrer noopener\">Intermediate Error Catch Event (Boundary Type)<\/a><\/li>\n<\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-coblocks-accordion\">\n<div class=\"wp-block-coblocks-accordion-item\"><details><summary class=\"wp-block-coblocks-accordion-item__title\">Script (click to open)<\/summary><div class=\"wp-block-coblocks-accordion-item__content\">\n<ul class=\"wp-block-list\">\n<li>An XML file that contains the code below is available to download\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/raw.githubusercontent.com\/Questetra\/Addon-XML\/release-2024-08-20\/github-repository-create.xml\" target=\"_blank\" rel=\"noreferrer noopener\">github-repository-create.xml<\/a> (C) Questetra, Inc. (MIT License)<\/li>\n\n\n\n<li>If you are using Professional, you can modify the contents of this file and use it as your own add-on auto step<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>\n\nconst API_VERSION = &#39;2022-11-28&#39;;\nconst API_VERSION_HEADER = &#39;X-GitHub-Api-Version&#39;;\n\nconst MAX_TOPIC_NUM = 20;\nconst MAX_TOPIC_LENGTH = 50;\n\nfunction main() {\n    \/\/\/\/\/\/ == \u5de5\u7a0b\u30b3\u30f3\u30d5\u30a3\u30b0\u30fb\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u306e\u53c2\u7167 \/ Config & Data Retrieving ==\n    const auth = configs.getObject(&#39;conf_Auth&#39;);\n    const org = configs.get(&#39;conf_Org&#39;);\n    const name = configs.get(&#39;conf_Name&#39;);\n    if (name === &#39;&#39;) {\n        throw new Error(&#39;Repository Name is blank.&#39;);\n    }\n    const visibility = configs.get(&#39;conf_Visibility&#39;);\n    const license = configs.get(&#39;conf_License&#39;);\n    const gitIgnore = configs.get(&#39;conf_GitIgnore&#39;);\n    const description = configs.get(&#39;conf_Description&#39;);\n    const homepage = configs.get(&#39;conf_Homepage&#39;);\n    const topics = retrieveTopics();\n\n    \/\/\/\/\/\/ == \u6f14\u7b97 \/ Calculating ==\n    let repo;\n    if (org === &#39;&#39;) {\n        repo = createRepositoryForUser(auth, name, visibility, license, gitIgnore, description, homepage);\n    } else {\n        repo = createRepositoryForOrganization(auth, org, name, visibility, license, gitIgnore, description, homepage);\n    }\n    if (topics.length &gt; 0) {\n        setTopics(auth, repo.full_name, topics);\n    }\n\n    \/\/\/\/\/\/ == \u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30c7\u30fc\u30bf\u3078\u306e\u4ee3\u5165 \/ Data Updating ==\n    saveData(&#39;conf_Url&#39;, repo.html_url);\n}\n\n\/**\n * config \u306b\u8a2d\u5b9a\u3055\u308c\u305f\u30c8\u30d4\u30c3\u30af\u3092\u8aad\u307f\u51fa\u3059\n * @returns {Array&lt;String&gt;} \u30c8\u30d4\u30c3\u30af\u306e\u914d\u5217\n *\/\nconst retrieveTopics = () =&gt; {\n    const dataDef = configs.getObject(&#39;conf_Topics&#39;);\n    if (dataDef === null) {\n        return [];\n    }\n    let topics = [];\n    if (dataDef.matchDataType(&#39;STRING&#39;)) { \/\/ \u6587\u5b57\u578b\u30c7\u30fc\u30bf\u9805\u76ee\u306e\u5834\u5408\n        const dataObj = engine.findData(dataDef);\n        if (dataObj === null) {\n            return [];\n        }\n        topics = dataObj.split(&#39;\\n&#39;)\n            .filter(name =&gt; name !== &#39;&#39;);\n    } else { \/\/ \u9078\u629e\u578b\u30c7\u30fc\u30bf\u9805\u76ee\u306e\u5834\u5408\n        const selects = engine.findData(dataDef);\n        if (selects === null || selects.size() === 0) {\n            return [];\n        }\n        selects.forEach(item =&gt; {\n            topics.push(item.getValue());\n        });\n    }\n    \/\/ \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\n    if (topics.length &gt; MAX_TOPIC_NUM) {\n        throw new Error(`The maximum number of topics is ${MAX_TOPIC_NUM}.`);\n    }\n    if (topics.some(topic =&gt; topic.length &gt; MAX_TOPIC_LENGTH)) {\n        throw new Error(`Each topic must be within ${MAX_TOPIC_LENGTH} characters.`);\n    }\n    const reg = new RegExp(`^[a-z0-9-]+$`);\n    if (!topics.every(topic =&gt; reg.test(topic))) {\n        throw new Error(&#39;Topics can only include lowercase letters, numbers, and hyphens.&#39;);\n    }\n    return topics;\n};\n\n\/**\n * \u30e6\u30fc\u30b6\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210\n * @param {AuthSettingWrapper} auth HTTP \u8a8d\u8a3c\u8a2d\u5b9a\n * @param {String} name \u30ea\u30dd\u30b8\u30c8\u30ea\u540d\n * @param {String} visibility \u516c\u958b\u8a2d\u5b9a\n * @param {String} license \u30e9\u30a4\u30bb\u30f3\u30b9\n * @param {String} gitIgnore .gitignore \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\n * @param {String} description \u8aac\u660e\n * @param {String} homepage \u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\n * @returns {Object} \u30ec\u30dd\u30b8\u30c8\u30ea\u60c5\u5831\n *\/\nconst createRepositoryForUser = (auth, name, visibility, license, gitIgnore, description, homepage) =&gt; {\n    const url = &#39;https:\/\/api.github.com\/user\/repos&#39;;\n\n    const private = visibility === &#39;private&#39;;\n    const payload = {name, private, description, homepage};\n    if (license !== &#39;&#39;) {\n        payload.license_template = license;\n    }\n    if (gitIgnore !== &#39;&#39;) {\n        payload.gitignore_template = gitIgnore;\n    }\n    const response = httpClient.begin()\n        .header(API_VERSION_HEADER, API_VERSION)\n        .authSetting(auth)\n        .body(JSON.stringify(payload), &#39;application\/json&#39;)\n        .post(url);\n\n    const status = response.getStatusCode();\n    const respTxt = response.getResponseAsString();\n    if (status !== 201) {\n        engine.log(respTxt);\n        throw new Error(`Failed to create a repository for the user. status: ${status}`);\n    }\n    return JSON.parse(respTxt);\n};\n\n\/**\n * \u7d44\u7e54\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210\n * @param {AuthSettingWrapper} auth HTTP \u8a8d\u8a3c\u8a2d\u5b9a\n * @param {String} org \u7d44\u7e54\u540d\n * @param {String} name \u30ea\u30dd\u30b8\u30c8\u30ea\u540d\n * @param {String} visibility \u516c\u958b\u8a2d\u5b9a\n * @param {String} license \u30e9\u30a4\u30bb\u30f3\u30b9\n * @param {String} gitIgnore .gitignore \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\n * @param {String} description \u8aac\u660e\n * @param {String} homepage \u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\n * @returns {Object} \u30ec\u30dd\u30b8\u30c8\u30ea\u60c5\u5831\n *\/\nconst createRepositoryForOrganization = (auth, org, name, visibility, license, gitIgnore, description, homepage) =&gt; {\n    const url = `https:\/\/api.github.com\/orgs\/${encodeURIComponent(org)}\/repos`;\n\n    const payload = {name, visibility, description, homepage};\n    if (license !== &#39;&#39;) {\n        payload.license_template = license;\n    }\n    if (gitIgnore !== &#39;&#39;) {\n        payload.gitignore_template = gitIgnore;\n    }\n    const response = httpClient.begin()\n        .header(API_VERSION_HEADER, API_VERSION)\n        .authSetting(auth)\n        .body(JSON.stringify(payload), &#39;application\/json&#39;)\n        .post(url);\n\n    const status = response.getStatusCode();\n    const respTxt = response.getResponseAsString();\n    if (status !== 201) {\n        engine.log(respTxt);\n        throw new Error(`Failed to create a repository for the organization. status: ${status}`);\n    }\n    return JSON.parse(respTxt);\n};\n\n\/**\n * \u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30c8\u30d4\u30c3\u30af\u3092\u8a2d\u5b9a\n * @param {AuthSettingWrapper} auth HTTP \u8a8d\u8a3c\u8a2d\u5b9a\n * @param {String} fullName \u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30d1\u30b9\n * @param {Array&lt;String&gt;} topics \u30c8\u30d4\u30c3\u30af\n *\/\nconst setTopics = (auth, fullName, topics) =&gt; {\n    const url = `https:\/\/api.github.com\/repos\/${fullName}\/topics`;\n\n    const response = httpClient.begin()\n        .header(API_VERSION_HEADER, API_VERSION)\n        .authSetting(auth)\n        .body(JSON.stringify({names: topics}), &#39;application\/json&#39;)\n        .put(url);\n\n    const status = response.getStatusCode();\n    const respTxt = response.getResponseAsString();\n    if (status !== 200) {\n        engine.log(respTxt);\n        throw new Error(`Failed to set topics. status: ${status}`);\n    }\n};\n\n\/**\n * \u30c7\u30fc\u30bf\u9805\u76ee\u3078\u306e\u4fdd\u5b58\n * @param {String} configName \u8a2d\u5b9a\u540d\n * @param {Object} data \u4fdd\u5b58\u3059\u308b\u30c7\u30fc\u30bf\n *\/\nconst saveData = (configName, data) =&gt; {\n    const def = configs.getObject(configName);\n    if (def === null) {\n        return;\n    }\n    engine.setData(def, data);\n};\n\n<\/code><\/pre><\/div>\n<\/div><\/details><\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This item creates a repository on GitHub.<\/p>\n","protected":false},"author":17,"featured_media":168851,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[551],"tags":[4310],"faq_section":[],"class_list":["post-168676","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bpmn-icons","tag-github"],"jetpack_publicize_connections":[],"uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1",1200,675,false],"thumbnail":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=440%2C440&ssl=1",440,440,true],"medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=560%2C315&ssl=1",560,315,true],"medium_large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=768%2C432&ssl=1",768,432,true],"large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1024%2C576&ssl=1",1024,576,true],"1536x1536":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1",1200,675,true],"2048x2048":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-portrait-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=900%2C675&ssl=1",900,675,true],"newspack-article-block-square-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=800%2C600&ssl=1",800,600,true],"newspack-article-block-portrait-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=600%2C675&ssl=1",600,675,true],"newspack-article-block-square-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=800%2C675&ssl=1",800,675,true],"newspack-article-block-landscape-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=600%2C450&ssl=1",600,450,true],"newspack-article-block-portrait-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=450%2C600&ssl=1",450,600,true],"newspack-article-block-square-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=600%2C600&ssl=1",600,600,true],"newspack-article-block-landscape-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=400%2C300&ssl=1",400,300,true],"newspack-article-block-portrait-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=300%2C400&ssl=1",300,400,true],"newspack-article-block-square-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=400%2C400&ssl=1",400,400,true],"newspack-article-block-landscape-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=200%2C150&ssl=1",200,150,true],"newspack-article-block-portrait-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=150%2C200&ssl=1",150,200,true],"newspack-article-block-square-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?resize=200%2C200&ssl=1",200,200,true],"newspack-article-block-uncropped":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1",1200,675,true]},"uagb_author_info":{"display_name":"Shiho Tatsumi","author_link":"https:\/\/support.questetra.com\/en\/author\/tatsumi48c607ec82\/"},"uagb_comment_info":0,"uagb_excerpt":"This item creates a repository on GitHub.","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-HSA","jetpack-related-posts":[{"id":172437,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-github-textfile-commit\/","url_meta":{"origin":168676,"position":0},"title":"GitHub: Create\/Update Textfile","author":"Hirotaka NISHI","date":"2025-05-08","format":false,"excerpt":"This item creates\/updates a text file in a specified repository on GitHub. To update an existing file, you have to specify the file's SHA.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":168684,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-github-repository-collaborator-add\/","url_meta":{"origin":168676,"position":1},"title":"GitHub: Add Repository Collaborator","author":"Hirotaka NISHI","date":"2024-12-19","format":false,"excerpt":"This item adds a collaborator to a specified repository on GitHub.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":175544,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-github-file-commit\/","url_meta":{"origin":168676,"position":2},"title":"GitHub: Upload\/Update File","author":"Hirotaka NISHI","date":"2025-09-22","format":false,"excerpt":"This item uploads\/updates a single file in a specified repository on GitHub. To update an existing file, you have to specify the file's SHA.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":175559,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-github-file-delete\/","url_meta":{"origin":168676,"position":3},"title":"GitHub: Delete File","author":"Hirotaka NISHI","date":"2025-09-22","format":false,"excerpt":"This item deletes a specified file from a repository on GitHub.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":172440,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-github-file-get\/","url_meta":{"origin":168676,"position":4},"title":"GitHub: Get File","author":"Hirotaka NISHI","date":"2025-05-08","format":false,"excerpt":"This item gets a specified file from a repository on GitHub.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":168700,"url":"https:\/\/support.questetra.com\/en\/bpmn-icons\/service-task-github-repository-collaborator-remove\/","url_meta":{"origin":168676,"position":5},"title":"GitHub: Remove Repository Collaborator","author":"Hirotaka NISHI","date":"2024-12-19","format":false,"excerpt":"This item removes a collaborator from a specified repository on GitHub.","rel":"","context":"In &quot;BPMN Icons&quot;","block_context":{"text":"BPMN Icons","link":"https:\/\/support.questetra.com\/en\/category\/bpmn-icons\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2024\/12\/bpmn-icon-service-task-github.png?fit=1200%2C675&ssl=1","_links":{"self":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/168676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/comments?post=168676"}],"version-history":[{"count":8,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/168676\/revisions"}],"predecessor-version":[{"id":168855,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/168676\/revisions\/168855"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/168851"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=168676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=168676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=168676"},{"taxonomy":"faq_section","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/faq_section?post=168676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}