Code Monkey home page Code Monkey logo

bot's Introduction

Bot for Harvester GitHub issue management Build Status

This repo helps to automate the Harvester issue and project management with:

  • Auto-create pre ready-for-testing checklist when the issue is moved to the Review pipeline.
  • Auto-create automation-related e2e test issue (by adding not-require/test-plan label).
  • Auto-create a backport issue when an issue contains the backport-needed/* label.

Bootstrap

Before starting this bot, you should setup following env and run that commands:

export ZENHUB_TOKEN=""
export GITHUB_TOKEN="" 
export GITHUB_OWNER="" 
export GITHUB_REPOSITORY=
export ZENHUB_PIPELINE="New Issues, Product Backlog, Icebox" # example
export FLASK_USERNAME="" # Use basic auth here, such as http://username:passowrd@localhost:8080
export FLASK_PASSWORD=""
export GITHUB_REPOSITORY_TEST=""
cd github-bot
gunicorn harvester_github_bot:app

Features

There are two webhooks deal with different features:

  1. Github Repository Webhook (GITHUB_TOKEN)
    When adding backport label on the Github, this bot will handle webhook to do following things:
    • Create an issue in GITHUB_REPOSITORY, and add it into release of Zenhub.
    • Sync Github milestone to Zenhub release, but don't support opposite way.
  2. Zenhub Integration Custom Webook (ZENHUB_TOKEN)
    When move the issue to specified pipleline (ZENHUB_PIPELINE) in Zenhub, this bot will handle the webhook to create comment in GITHUB_REPOSITORY, and create an issue in e2e testing repo (GITHUB_REPOSITORY_TEST).

References

Harvester-bot currently uses Zenhub REST API, but it recommends to use GraphQL, more detail on https://developers.zenhub.com/.

License

Copyright (c) 2024 SUSE

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

bot's People

Contributors

bk201 avatar chrisho avatar futuretea avatar guangbochen avatar innobead avatar ttpcodes avatar yasker avatar yu-jack avatar

Watchers

 avatar

bot's Issues

Create GUI issues when necessary

If an issue has a require-ui/xxx label, automatically create a GUI issue for this issue.
Note if the issue has the label area/ui, we don't need to create a separate issue.

Can't create backport when assignee is invalid

Not sure why it can't create backport issue in this harvester/harvester#4179.

The error message is 422 {"message": "Validation Failed", "errors": [{"value": "******", "resource": "Issue", "field": "assignees", "code": "invalid"}], "documentation_url": "https://docs.github.com/rest/issues/issues#create-an-issue"}

@bk201 : Guess that assignee is not the harvester member.

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.