A simple bot that reminds forgetful developers of merging quick fixes from rc into develop branch
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.
- NodeJS ( min 12.14.1 ) for app serving and other development process
Please copy .env.example
into .env
file and fill with correct data
At first please install NodeJS on your machine, after that please run below commands:
npm ci
npm start
At first please install NodeJS on your machine, after that please run below commands:
npm ci
npm run start-prod
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
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
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 :)