DEV Community

Cover image for A Workflow for Sending GitHub Issues, PRs, or Discussions Updates to WeChat
Hollow Man
Hollow Man

Posted on

A Workflow for Sending GitHub Issues, PRs, or Discussions Updates to WeChat

GitHub logo HollowMan6 / GitHub-Issues-to-Wechat

Send GitHub Issues, PRs or Discussions Updates to Wechat.(将 GitHub Issues, PRs 或者 Discussions 更新消息发送到微信)

Send timed message to Wechat

last-commit release-date Python package

Followers watchers stars forks

Open Source Love GPL Licence Repo-Size

Total alerts Language grade: Python

(中文版本在下方)

Send GitHub Issues, PRs or Discussions Updates to Wechat

Source Github Repository Link: https://github.com/HollowMan6/GitHub-Issues-to-Wechat

Please ★Star if you think it's great!

Python library dependency

Source Code

Example Workflow

Usage

you can fork this repository first, and then create Actions Secrets and set related settings in your forked repository (click in the order of 1, 2 and 3 as shown in the figure below).

You can choose one or more of the following three push platforms to receive pushed messages:

PushPlus(Recommended)

First log into pushplus, and then find your token in pushplus website, create a actions secret with the name of PPTOKEN and the value of your token value, and then one-to-one push the related information results.

If you need to push the related information to multiple Wechat accounts, that is, one-to-many push, you need to create a group, write down the group code…

Motivation

Many Chinese developers prefer to use WeChat when they are at work, so they seldom check their emails. While GitHub only provides notifications for issues, PRs, or discussions by email, many Chinese developers may delay their response to those updates. As a result, setting up a Workflow for sending GitHub issues, PRs, or discussions updates to WeChat will bring great convenience for Chinese developers.

Features

Send GitHub issues, PRs, or discussions updates to WeChat, just like those updates sent by GitHub through emails.

Realization

This workflow is realized through several WeChat message push platforms, such as PushPlus and ServerChan, as well as the native Enterprise version of WeChat (WeCom) message push API.

The workflow uses python requests library for coding, and Docker for packaging to be used in the GitHub Actions.

Usage

You can choose a realization for pushing the messages to WeChat, and set the needed GitHub Actions secrets as the instructions here.

An example use for this workflow is here.

You can set at what event the notifications will be sent through Wechat by modifying these headers and using them in your workflow.

Then, append the following line in the steps of your workflow.

- name: 'Send GitHub Update Message to Wechat'
  uses: HollowMan6/GitHub-Issues-to-Wechat@v1
  with:
    DELAYS: ${{ secrets.DELAYS }}
    SERVERCHANSCKEY: ${{ secrets.SERVERCHANSCKEY }}
    PPTOKEN: ${{ secrets.PPTOKEN }}
    PPTOPIC: ${{ secrets.PPTOPIC }}
    CORPID: ${{ secrets.CORPID }}
    CORPSECRET: ${{ secrets.CORPSECRET }}
    AGENTID: ${{ secrets.AGENTID }}
Enter fullscreen mode Exit fullscreen mode

Finally, enjoy it!

Top comments (1)

Collapse
 
usernamedd profile image
usernamedd

Awesome, as a chinese i really appreciate it ! good job!