Skip to content

Commit

Permalink
test basic octokit call
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub committed Nov 24, 2024
1 parent a98c649 commit 4160848
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions actions/request-review/action.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: SCI Review Manager Helper
inputs:
github-token:
default: ${{ github.token }}
runs:
using: node20
main: index.js
16 changes: 16 additions & 0 deletions actions/request-review/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const core = require('@actions/core');
const github = require('@actions/github');

async function run() {
const token = core.getInput('github-token', {required: true});
const octokit = github.getOctokit(token);

const { data: pullRequest } = await octokit.rest.pulls.list({
owner: github.context.owner,
repo: github.context.repo
});

console.log(pullRequest);
}

run();

0 comments on commit 4160848

Please sign in to comment.