Skip to content

Latest commit

 

History

History
51 lines (29 loc) · 1.44 KB

README.md

File metadata and controls

51 lines (29 loc) · 1.44 KB

🐧 Feishu-On-Leave-Status-Sync

中文 | English

💡 Motivation

When someone applies for a leave in Feishu, his/her status is not known to others unless they are explicitly mentioned. This script aims to solve this problem by automatically updating the on-leave status on Feishu.

This repository contains a simple script and a GitHub workflow definition to automatically synchronize the on-leave status on Feishu. The job will run periodically every 2 hours by default.

🛠 Usage

  1. Create a Feishu bot application on the Feishu Development Platform and enable the bot capability.

Create a Feishu bot application

  1. Get the App ID and secret.

Credentials

  1. Give the application the listed permissions.
  • calendar:timeoff
  • approval:instance

approval permission calendar permission

  1. You can run it locally or run it via GitHub Actions periodically.
  • Run locally
python main.py \
--app-id <app-id> \
--app-secret <app-secret> \
--hours 4 \
--approval-code <approval-code>
  • Run via GitHub Actions. You need to define the following action secrets.

GitHub Action Secrets

👀 Outcome

With this script, you can see the on-leave status on Feishu is synchronized automatically.

Feishu