shouldideploy
shouldideploy copied to clipboard
Source of shouldideploy.today
shouldideploy.today
Getting started
- Run:
-
npm i
— install deps. -
npm run dev
start dev server -
now dev
if you need local serveless function (requires now)
-
Add your reasons
Reasons are located under reasons.ts
API endpoint
There is an endpoint to use on your CI or just for fun at https://shouldideploy.today/api
You can also provide optional parameters to customize the API response:
-
tz
: The timezone to use when evaluating the date and time. The default value is UTC. Pass a valid timezone string, such asAmerica/New_York
orEurope/London
defaultUTC
. -
date
: The date to evaluate. The default value is the current date. Pass a valid date string in the formatYYYY-MM-DD
, such as2023-03-31
.
Examples
Get the default API response using the current date and time in the UTC timezone:
https://shouldideploy.today/api
Get the API response for a specific timezone (e.g., Europe/London):
https://shouldideploy.today/api?tz=Europe/London
Get the API response for a specific date (e.g., 2023-03-31) in the UTC timezone:
https://shouldideploy.today/api?date=2023-03-31
Get the API response for a specific date (e.g., 2023-03-31) in a specific timezone (e.g., America/New_York):
https://shouldideploy.today/api?tz=America/New_York&date=2023-03-31
API Response
The API returns a JSON object containing the following keys:
-
timezone
: The timezone used for evaluating the date and time. -
date
: The date provided as parameter in ISO format (YYYY-MM-DDTHH:mm:ss.sssZ) -
shouldideploy
: A boolean value indicating whether you should deploy today or not. -
message
: A string containing a reason or explanation for theshouldideploy
result.
Example response:
{
"timezone": "UTC",
"date": "2023-03-31T00:00:00.000Z",
"shouldideploy": false,
"message": "It's Friday, better not deploy today."
}
Community projects
- gustamms/devo-fazer-deploy-hoje Versão brasileira do site https://shouldideploy.today/
- timelfrink/shouldideploy-action This action checks the website shouldideploy.today and stops deployments if the site tells us not to do so.
- panacaqui/should-i-deploy-today-discord-bot A simple API to send a daily message from shouldideploy.today in a Discord channel.
- MatheusHAS/shouldideploytoday-for-pipeline This example of implementation, consumes the shouldideploy.today API to decide on my pipeline if will be deploy process run or not.
- Brunomachadob/shouldideploy-slack Should I Deploy Slack command
- gpalomar/shouldideploy-vscode A Visual Studio Code Extension that uses https://github.com/baires/shouldideploy 🍻⚠️
Credits
Favicon created by emilegraphics