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

An API to perform quick actions on the PR #4

Open
jacktomlinson opened this issue Jun 15, 2019 · 1 comment
Open

An API to perform quick actions on the PR #4

jacktomlinson opened this issue Jun 15, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@jacktomlinson
Copy link

Would be pretty cool if you got a few things out the box to enrich the task experience with the PR.

For example if you could import a set of functions that let you:

  • Create comments on the PR
  • Update the Title
  • Add labels
  • Remove labels
  • Request reviewers
  • Approve, Block, Merge etc...
@boyney123 boyney123 added the enhancement New feature or request label Jun 15, 2019
@boyney123
Copy link
Owner

sounds good @jacktomlinson ;)

At the moment there is two APIS, setDecription and also runCommand. Maybe extending out into a github object might make sense.

Example

module.exports = options => {
  const { setDescription, github } = options;

  // adds the label
  await github.addLabel('test');

  // could add a comment
  await github.addComment('Thanks for the PR')


  return new Promise(async (resolve, reject) => {
    // add some custom code here
    resolve("Everything passed");
  });
};

We currently use octokit to integrate with Github. https://octokit.github.io/rest.js/

So many we could use that to do the things you spoke about

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants