GithubHelp home page GithubHelp logo

eekdageek / issue-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imjohnbo/issue-bot

0.0 0.0 0.0 9.88 MB

GitHub Actions powered Issue Bot ๐Ÿฆพ

License: MIT License

JavaScript 100.00%

issue-bot's Introduction

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 will open a new issue based on input values issue template of your choice. You can make it close the most recent one of its type, you can pin it, and since it's open source, pull requests are welcome!

Usage

As a daily standup bot:

name: Daily Standup
on:
  schedule:
  - cron: 0 12 * * *  # Every day at noon โ€“ https://crontab.guru

jobs:
  daily_standup:
    name: Daily Standup
    runs-on: ubuntu-latest
    steps:

    # Repo code checkout required if `template` is used
    - name: Checkout
      uses: actions/checkout@v2
      
    - name: issue-bot
      uses: imjohnbo/issue-bot@v2
      with:
        assignees: "comma, delimited, list, of, handles" # GitHub handles without the @
        labels: "standup"
        pinned: true
        close-previous: true
        template: ".github/ISSUE_TEMPLATE/standup.md" # assignees, labels will be overridden if present in YAML header
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

To keep track of repeated tasks:

name: Generate TPS reports
on:
  schedule:
  - cron: 0 0 1 * *  # First of every month โ€“ https://crontab.guru

jobs:
  tps_reports:
    name: TPS reports
    runs-on: ubuntu-latest
    steps:

    # Repo code checkout required if `template` is used
    - name: Checkout
      uses: actions/checkout@v2

    - name: issue-bot
      uses: imjohnbo/issue-bot@v2
      with:
        assignees: "me"     # your GitHub handle without the @
        labels: "tps, bug"
        pinned: false
        close-previous: false
        template: "tps.md" 
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Or just downstream of a failed CI step ๐Ÿ’”:

name: Continuous Integration
on:
  [push, pull_request]

jobs:
  ci:
    name: CI
    runs-on: ubuntu-latest
    steps:

    # Repo code checkout required if `template` is used
    - name: Checkout
      uses: actions/checkout@v2

    - name: CI
      run: |
        echo "...these are some CI steps..."

    - name: issue-bot
      if: failure()
      uses: imjohnbo/issue-bot@v2
      with:
        assignees: "handles, of, my, teammates"    # GitHub handles without the @
        label: "ci"
        pinned: false
        close-previous: false
        template: "ci-failure.md"
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

In action:

Issue Bot Image

Inputs

  • labels: Comma delimited list of issue labels. Required value either as input or in YAML header of issue template.
  • title: Issue title. Required value either as input or in YAML header of issue template.
  • assignees: Comma delimited list of issue assignees.
  • body: Issue body.
  • pinned: Whether to pins the issue and unpin the previous one.
  • close-previous: Whether to close the most recent previous issue with a matching label.
  • template: Path to template used in issue, eg. .github/ISSUE_TEMPLATE/bug_report.md. Can also be a normal Markdown file with no YAML header (converted to body), in which case, labels, title, and assignees can be provided as inputs.

Outputs

  • issue-number: new issue number, if successfully created.

Environment variables

Contributing

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

License

MIT

issue-bot's People

Contributors

dependabot[bot] avatar imjohnbo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.