Skip to content

GitHub Action to check if it real late where your remote teammate lives?

License

Notifications You must be signed in to change notification settings

shundor/are-they-asleep

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Are They Asleep?

Check a teammate's timezone and see if they're awake!

unit-testscode style: prettier

About

This action allows you to check a teammate's timezone via an issue or PR comment.

Usage

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.

Inputs

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.

Outputs

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!

Example

This repo contains an example workflow that contains this action.

Credits

About

GitHub Action to check if it real late where your remote teammate lives?

Resources

License

Stars

Watchers

Forks

Packages

No packages published