Check a teammate's timezone and see if they're awake!
This action allows you to check a teammate's timezone via an issue or PR comment.
Create a workflow like the following:
name: Example Workflow
on:
issue_comment:
types: [created, edited]
branches:
- main
jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check if teammate is awake?
id: are-they-asleep
uses: shundor/are-they-asleep@v1.0.0
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GOOGLE_API_KEY: "${{ secrets.GOOGLE_API_KEY }}"
Then, in your issue or PR, add this comment:
is @teammate awake?
@teammate
being the remote teammate you want to check.
The following secret needs to be created:
GOOGLE_API_KEY
: The Google Cloud API Key
The following Google Map Platform API's need to be enabled, and the API should be restricted to them:
- Geocoding API
- Geolocation API
- Maps JavaScript API
- Time Zone API
For this action to work correctly the team must have their location set in their GitHub Profile.
If successful, the issue will have a new comment with the teammate's timezone info:
Hi there, abirismyname! 👋
You asked if rufusmbugua was awake yet.
I can't tell you about their personal sleeping habits, sadly.
I can tell you though that the date and time for rufusmbugua in Nairobi, Kenya is currently:
December 29th 2022, 7:28 pm
I hope that helps clarify the matter for you!
This repo contains an example workflow that contains this action.
- 🙇 Based on bencgreenberg/awake-yet-action.
- 🙇 @breton for the testing and help!
- 🙇 @manishapriya94 for inspiration!