Giter VIP home page Giter VIP logo

rc-reminder-bot's Introduction

rc-reminder-bot

Description:

A simple bot that reminds forgetful developers of merging quick fixes from rc into develop branch

Problem to solve:

When your company is following git-flow workflow ( or something similar ) you are familiar with quick-fix in the production branch.
So when you are going to merge your fix into master ( or another branch ) then you should merge that change also to develop ( sooner or later )
If you will forget and someone overrides your changes then you got git conflicts ( which someone needs to solve ).
When you are making a lot of deployments to production with a lot of minor fixes the problem is getting bigger,
cause a lot of time you will be spending on resolving conflicts.
I hope this bot will solve it, cause it will be reminding about that changes on a slack channel.

Requirements:

  • NodeJS ( min 12.14.1 ) for app serving and other development process

Before you will start

Please copy .env.example into .env file and fill with correct data

How to run our application ( in development mode )

At first please install NodeJS on your machine, after that please run below commands:

npm ci
npm start

How to run our application ( in production mode )

At first please install NodeJS on your machine, after that please run below commands:

npm ci
npm run start-prod

How get SLACK_CHANNEL_WEBHOOK_URL

To get SLACK_CHANNEL_WEBHOOK_URL you need to create slack app https://api.slack.com/apps?new_app=1.
When you will create it then you will need to click Incoming Webhooks link and active it.
Then you need to create a new hook by clicking Add New Webhook to Workspace.
After that you need to copy URL from sample curl.
And should look similar to:

https://hooks.slack.com/services/aaa/bbb/ccc

How get GH_ACCESS_TOKEN

If our repos are private we cannot use GITHUB_TOKEN from github actions env, so we need to create own token.
At first, you need visit https://github.com/settings/tokens.
Then you need to generate new token.
So you need to name it and give particular permissions.
In our case repo or Full control of private repositories will be enough.
And should look similar to:

aaa-bbb-ccc-ddd-eee-fff

How to run it via Github workflow cron

At first, you need to update env variables in daily-job.yml.
If you need to change time, or the cron you need to specify its value.
For example: 30 4 * * * Means 4:30 UTC time
For of the work will be done by Github so enjoy the free time :)

rc-reminder-bot's People

Contributors

sztadii avatar lgandecki avatar rshaikh avatar

Watchers

James Cloos avatar Akash avatar  avatar Paul Segura avatar sayli kadam avatar Abid Ali avatar ziad jendi avatar Abhishek Thakur avatar Prasun Kumar Palchowdhury avatar  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.