Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(token, opts = {}) {
super(Object.assign(Object.assign({}, opts), { auth: `token ${token}` }));
this.graphql = graphql_1.defaults({
headers: { authorization: `token ${token}` }
});
}
}
constructor(token) {
super({ auth: `token ${token}` });
this.graphql = graphql_1.defaults({
headers: { authorization: `token ${token}` }
});
}
}
export async function createTask(
information: TaskInformation,
): Promise {
const graphql = require('@octokit/graphql').defaults({
headers: {
authorization: `token ${process.env.GITHUB_TOKEN ||
invariant(false, 'Required GITHUB_TOKEN variable.')}`,
},
})
const result = await graphql(
`
mutation CreateIssue($input: CreateIssueInput!) {
createIssue(input: $input) {
issue {
number
}
}
}
`,
{
constructor(token, opts = {}) {
super(Object.assign(Object.assign({}, opts), { auth: `token ${token}` }));
this.graphql = graphql_1.defaults({
headers: { authorization: `token ${token}` }
});
}
}
constructor(token, opts = {}) {
super(Object.assign(Object.assign({}, opts), { auth: `token ${token}` }));
this.graphql = graphql_1.defaults({
headers: { authorization: `token ${token}` }
});
}
}