Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions bin/create-doc-pr.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env node

import * as path from "pathe"
import {fileURLToPath} from "node:url"
import {createRequire} from 'node:module'

import * as path from "pathe"
import {findUp} from "find-up"

import {withOctokit} from './github-utils.js'

const require = createRequire(import.meta.url)
Expand All @@ -22,11 +23,11 @@ async function createPR() {
files[`areas/platforms/shopify-dev/db/data/docs/templated_apis/shopify_cli/${fileName}`] = (await readFile(path.join(generatedDirectory, fileName))).toString()
}

await withOctokit("shopify", async (octokit) => {
await withOctokit("shop", async (octokit) => {
const response = await octokit
.createPullRequest({
owner: "shopify",
repo: "shopify-dev",
owner: "shop",
repo: "world",
title: `[CLI] Update docs for version: ${version}`,
body: `We are updating the CLI documentation with the contents of the recently released version of the Shopify CLI [${version}](https://www.npmjs.com/package/@shopify/cli/v/${version})`,
head: `shopify-cli-${version}`,
Expand All @@ -43,7 +44,7 @@ async function createPR() {
})

if (response) {
console.log(`PR URL: https://github.com/shopify/shopify-dev/pull/${response.data.number}`)
console.log(`PR URL: https://github.com/shop/world/pull/${response.data.number}`)
} else {
console.log("No changes detected, PR not created.")
}
Expand Down
Loading