Skip to content
watch

GitHub Action

tf-siesta

v1.3 Latest version

tf-siesta

watch

tf-siesta

Github Action checking if a Google Calendar it is busy or not, so you can schedule a Siesta

Installation

Copy and paste the following snippet into your .yml file.

              

- name: tf-siesta

uses: Typeform/siesta@v1.3

Learn more about this action in Typeform/siesta
Choose a version

Siesta

A Github Action that integrates Google Calendar, telling you if your schedule is busy or not.

alt text

Usage

Input Variables:

google-credentials: Mandatory, serialized string of the contents of the credential.json generated by enabling the Calendar API. More info
google-token: Mandatory, serialized string of the contents of the token.json generated by running this script
google-calendar-id: Optional, Google Calendar ID as returned by the CalendarsList call. More info
custom-calendar-busy-message: Optional, string that is displayed if the calendar is busy with events in a given time frame custom-calendar-not-busy-message: Optional, string that is displayed if the calendar is not busy with events in a given time frame
fail-if-busy: Optional, boolean that controls if the build should fail if the calendar is busy. by default is true.
hard-failure: Optional, boolean, if true, fails the build on any error. If false, throws an warning instead. Default is false.
minutes-interval: Optional, int, the interval of time, starting from the moment of execution, on which to check that the calendar is busy. Default 0.1 seconds.

Output Variables:

calendar-busy: Boolean, true if the calendar is busy with events, false if the calendar is not busy with events.
In case the calendar is busy, the action fails.
For more info, don't hesitate to check action.yml.

Contributing

All code should pass tests, as well as be well documented. Please also see the Commit Message Guidelines for how commit messages should be structured.

Developing

Prerequisites

  • Node.js
  • Yarn

Installation

To install the project dependencies:

yarn

Copy the contents of the .env.dist file into a new file called .env and fill in the necessary variables with your own variables.

How to run it

yarn start

How to run tests

yarn test

How to distribute

Github actions require all the package dependencies in the repo to run the JavaScript code.
We prefer to distribute our code and modules into a single file: dist/index.js. To do that, run:

yarn distribute