File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ Load `octokit-plugin-unique-issue` and [`@octokit/core`](https://github.com/octo
2020``` html
2121<script type =" module" >
2222 import { Octokit } from " https://cdn.skypack.dev/@octokit/core" ;
23- import { uniqueIssue } from " https://cdn.skypack.dev/octokit-plugin-unique-issue" ;
23+ import {
24+ uniqueIssue ,
25+ composeUniqueIssue ,
26+ } from " https://cdn.skypack.dev/octokit-plugin-unique-issue" ;
2427 </script >
2528```
2629
@@ -35,7 +38,10 @@ Install with `npm install @octokit/core octokit-plugin-unique-issue`. Optionally
3538
3639``` js
3740const { Octokit } = require (" @octokit/core" );
38- const { uniqueIssue } = require (" octokit-plugin-unique-issue" );
41+ const {
42+ uniqueIssue ,
43+ composeUniqueIssue ,
44+ } = require (" octokit-plugin-unique-issue" );
3945```
4046
4147</td ></tr >
@@ -96,6 +102,20 @@ if (closed_issues.length) {
96102}
97103```
98104
105+ ### Direct usage (not as a plugin)
106+
107+ ``` js
108+ const octokit = new Octokit ({ auth: " secret123" });
109+
110+ const { data , updated } = await composeUniqueIssue (octokit, {
111+ identifier: " super-unique-identifier" ,
112+ owner: " tmelliottjr" ,
113+ repo: " octokit-plugin-unique-issue" ,
114+ title: " My unique issue" ,
115+ body: " The body of my unique issue!" ,
116+ });
117+ ```
118+
99119## Options
100120
101121<table width =" 100% " >
Original file line number Diff line number Diff line change 66import { VERSION } from "./version" ;
77import { composeUniqueIssue } from "./compose-unique-issue" ;
88
9+ export { composeUniqueIssue } from "./compose-unique-issue" ;
910
1011export function uniqueIssue ( octokit : Octokit ) {
1112 return {
You can’t perform that action at this time.
0 commit comments