npm.io
5.2.1 • Published 1 month ago

@google-automations/issue-utils

Licence
Apache-2.0
Version
5.2.1
Deps
1
Size
30 kB
Vulns
0
Weekly
0
Stars
748

Utility for Managing GitHub issues

This is a small utility for managing GitHub issues.

Usage

Install

npm i @google-automations/issue-utils
Usage

addOrUpdateIssue will automatically open or update a GitHub issue. It searches for the issue by title and will update it if necessary.

Example usage:

import {addOrUpdateIssue} from '@google-automations/issue-utils';

const issue = await addOrUpdateIssue(
  octokit,
  'testOwner',
  'testRepo',
  'This is the title of the issue',
  'This is the body of the issue',
  ['some-label', 'another-label']
);
console.log('Issue: ', issue.number);

Keywords