Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial version #322

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
61163a2
docs(README): badges
gr2m Aug 8, 2019
2274af1
build(gitignore): coverage, node_modules, pkg
gr2m Aug 8, 2019
dc13799
build(tsconfig): Typescript configuration required for `@pika/pack`
gr2m Aug 8, 2019
b4b3ca0
build(package): initial version
gr2m Aug 8, 2019
af04ee9
build(package): lock file
gr2m Aug 8, 2019
914ada3
test: initial version
gr2m Aug 8, 2019
5577a54
ci: initial version
gr2m Aug 8, 2019
93b5d9e
feat: initial version
gr2m Aug 8, 2019
fc6b9a5
test: Octokit.plugin
gr2m Aug 9, 2019
cb6a5cd
feat: Octokit.plugin
gr2m Aug 9, 2019
5fd9f38
build(package): @octokit/request, universal-user-agent
gr2m Aug 9, 2019
381b0a5
build(package): lock file
gr2m Aug 9, 2019
cc16c42
test: `octokit.request()`
gr2m Aug 9, 2019
31ea212
feat: `octokit.request()`
gr2m Aug 9, 2019
4f8aad7
build(package): before-after-hook
gr2m Aug 14, 2019
91cf47e
test: `octokit.hook`
gr2m Aug 14, 2019
719b9fa
feat: `octokit.hook`
gr2m Aug 14, 2019
6a05484
test: `octokit.graphql()` todo
gr2m Aug 14, 2019
9937d88
docs(README): `auth` option can only be a string for now
gr2m Aug 15, 2019
b368827
test: `auth` option
gr2m Aug 15, 2019
9e30cc8
feat: `auth` option (string only)
gr2m Aug 15, 2019
48da2b0
build(package): @octokit/graphql
gr2m Aug 16, 2019
5871dcb
build(package): lock file
gr2m Aug 16, 2019
e451d3a
docs(README): fix `.graphql()` usage example
gr2m Aug 16, 2019
90f3dd7
test: `octokit.graphql()`
gr2m Aug 16, 2019
e11b781
feat: `octokit.graphql()`
gr2m Aug 16, 2019
762eef1
build(package): semantic-release
gr2m Aug 16, 2019
8703f5f
ci: release workflow
gr2m Aug 16, 2019
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
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Node CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [8, 10, 12]

steps:
- uses: actions/checkout@master
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
version: ${{ matrix.node_version }}
- name: Install
run: npm ci
- name: Test
run: npm test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage/
node_modules/
pkg/
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# 🚧 THIS IS A DRAFT ONLY

# core.js

[![@latest](https://img.shields.io/npm/v/@octokit/core.svg)](https://www.npmjs.com/package/@octokit/core)
[![Build Status](https://travis-ci.org/octokit/core.js.svg?branch=master)](https://travis-ci.org/octokit/core.js)
[![Greenkeeper](https://badges.greenkeeper.io/octokit/core.js.svg)](https://greenkeeper.io/)

> Extendable client for GitHub's REST & GraphQL APIs

<!-- toc -->
Expand Down Expand Up @@ -63,31 +65,33 @@ See https://github.com/octokit/request.js for full documentation of the `.reques
### GraphQL example

```js
const octokit = new Octokit({ auth: `secret123`});
const octokit = new Octokit({ auth: `secret123` });

const response = await octokit.graphql(`
query ($login: String!) {
const response = await octokit.graphql(
`query ($login: String!) {
organization(login: $login) {
repositories(privacy: PRIVATE) {
totalCount
}
}
}`,
login: 'octokit');
{ login: "octokit" }
);
```

See https://github.com/octokit/graphql.js for full documentation of the `.graphql` method.

## Authentication

The `auth` option passed be one of
The `auth` option is a string and can be one of

1. A personal access token
1. An OAuth token
1. A GitHub App installation token
1. A GitHub App JSON Web Token
1. A GitHub Action token (`GITHUB_TOKEN` environment variable)
1. An [@octokit/auth](https://github.com/octokit/auth.js) instance

More complex authentication strategies will be supported by passing an [@octokit/auth](https://github.com/octokit/auth.js) instance (🚧 currently work in progress).

## Hooks

Expand Down
Loading