Giter Site home page Giter Site logo

github-slack-bot's Introduction

Github-Slack-Bot

Tech Environment

  • Python v3.12
  • actions/checkout@v3
  • actions/setup-python@v3
  • python code의 의존성을 위해 requirements.txt로 라이브러리 설치

member_list.json

해당 파일에 멤버 리스트를 등록하여 사용합니다.

[
  {
    "githubName": "CEethan",
    "slackUserId": "U069RPHRU95"
  },
  {
    "githubName": "EeeasyCode",
    "slackUserId": "U069RPHRU95"
  }
]

이와 같은 형식으로 등록합니다.


PR notificaiton bot

지정한 레포지토리의 PR이 남아있는지 확인 후, 평일 지정한 시간에 Slack을 통해 알림을 전송하는 Bot 입니다.

Code Description

pr-notification.py

  • python 코드로 slack, github 연동
  • github repository 정보를 가져와 slack 메시지 형태로 가공
  • 가공된 메시지를 지정한 slack 채널로 전송

pr-notification-bot.yml

  • schedule -> cron 표현식을 통해 지정한 시간마다 동작하도록 스케줄링
  • 이후, github secret을 사용해 env 값 설정
  • github action을 활용하여 pr-notification.py를 실행

assign reviewer bot

PR을 올리면 랜덤으로 리뷰어가 할당되어 Slack을 통해 알림받을 수 있습니다.

Code Description

assign-reviewer.py

  • python 코드로 slack, github 연동
  • python 내부 로직에 의해, 자동으로 리뷰어를 할당하여 등록함
  • 리뷰어로 할당된 멤버에게 Slack 메시지 전송

assign-reviewer-bot.yml

  • PR 이벤트를 감지하여 PR이 올라올 경우 해당 action 트리거
  • 이후, github secret을 사용해 env 값 설정
  • github action을 활용하여 assign-reviewer.py를 실행

review check bot

리뷰어가 PR에 대한 리뷰를 완료하면 PR 담당자에게 Slack 메시지를 전송합니다.

Code Description

review-check.py

  • python 코드로 slack, github 연동
  • python 내부 로직에 의해 PR 담당자에게 리뷰가 되었음을 알림

review-check-bot.yml

  • PR의 리뷰 이벤트를 감지하여 리뷰가 등록된 경우 해당 action 트리거
  • 이후, github secret을 사용해 env 값 설정
  • github action을 활용하여 review-check.py를 실행

github-slack-bot's People

Contributors

eeeasycode avatar

Watchers

 avatar

github-slack-bot's Issues

Git local -> origin conflict

발생한 문제

Repo에서 특정 브랜치에 Feature를 만들고나서 main과 merge하고 나서 삭제를 하더라도 Local에서는 해당 브랜치가 존재하는 상황.
(git remote update를 작성하더라도 Local의 정보들은 지워지지 않음)

해결 방안

git remote prune origin 을 통해 Local에서 Remote에 없는 브랜치 제거

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.