/issue-bot

GitHub Actions powered Issue Bot 🦾

Primary LanguageJavaScriptMIT LicenseMIT

Issue Bot

GitHub Actions powered Issue Bot 🦾

About

Work on a distributed team? Try using Issue Bot as a Scrum standup process automation bot to keep track of what you're all working on. 🤖

Have repeated tasks you're setting reminders for elsewhere? Issue Bot's got your back there, too. 👏

Or just need an issue created on a certain condition? Issue Bot is there when your CI build breaks. 💔

Issue Bot is a flexible GitHub action that takes care of a few issue related tasks:

  • Opens new issue with title, body, labels, and assignees
  • Uses Mustache templating syntax in body, along with a couple of handy template variables: assignees and previousIssueNumber
  • Closes most recent previous issue with all labels if close-previous is true
  • Adds new issue to project (user, organization, or repository project based on value of project-type), column, and milestone
  • Pins new issue and unpins previous issue if pinned is true
  • Makes issue comments linking new and previous issues if linked-comments is true
  • Assigns new issue only to the next assignee in the list if rotate-assignees is true. Useful for duty rotation like first responder.
  • Pairs well with imjohnbo/extract-issue-template-fields if you'd prefer to open issues based on issue templates

v3 Migration

⚠️ If you're a v2 user, please note that these breaking changes were introduced in v3: ⚠️

and these features were added 🎉:

As always, your feedback and contributions are welcome.

Usage

Simple example:

# ...
- name: Create new issue
  uses: imjohnbo/issue-bot@v3
  with:
    assignees: "octocat, monalisa"
    title: Hello, world
    body: |-
      :wave: Hi, {{#each assignees}}@{{this}}{{#unless @last}}, {{/unless}}{{/each}}!
    pinned: true
# ...

For more examples, see a GitHub-wide search or ./docs/example-workflows:

Inputs and outputs

See action.yml

Template variables

The issue body is treated as a Handlebars template, with support for template variables:

  • assignees: The array of issue assignees.
  • previousIssueNumber: The previous issue number in the series.

The linked comments (linked-comments-new-issue-text, linked-comments-previous-issue-text) support these variables and:

  • newIssueNumber: The new issue number.

Contributing

Feel free to open an issue, or better yet, a pull request!

License

MIT