diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97c84be87..aebb85974 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,10 @@ jobs: name: Build and Test timeout-minutes: 15 runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + issues: write strategy: matrix: node: [18, 20, 21] @@ -40,6 +44,11 @@ jobs: - name: Transpile, typecheck, Lint and test run: pnpm check + - name: temporary + run: node packages/tool.release/build/js/index.mjs --repo palantir/osdk-ts --mode 'version' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # catches some of the examples that don't have transpile/typecheck tasks - name: Build run: pnpm build diff --git a/packages/tool.release/src/index.ts b/packages/tool.release/src/index.ts index 602d64299..d9ce79c7a 100644 --- a/packages/tool.release/src/index.ts +++ b/packages/tool.release/src/index.ts @@ -77,6 +77,7 @@ async function getContext( // ref: , sha: (await getStdoutOrThrow("git", ["rev-parse", "HEAD"])).trim(), branch: args.branch + ?? process.env.GITHUB_HEAD_REF ?? (await getStdoutOrThrow("git", ["symbolic-ref", "HEAD"])).replace( "refs/heads/", "", @@ -143,6 +144,17 @@ class FailedWithUserMessage extends Error { const context = await getContext(args); + await context.octokit.rest.issues.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: "Test issue", + body: "Test issue body", + }); + + if (1 / 1 === 1) { + throw "tmp"; + } + if (args.cwd) { consola.info(`Changing directory to ${args.cwd}`); process.chdir(args.cwd);