Skip to content

Commit

Permalink
Check issue creation for theory
Browse files Browse the repository at this point in the history
  • Loading branch information
ericanderson committed Apr 17, 2024
1 parent 67fd3c5 commit be7d807
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions packages/tool.release/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
"",
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit be7d807

Please sign in to comment.