GitXplorerGitXplorer
n

groupme-notify-action

public
1 stars
1 forks
0 issues

Commits

List of commits on branch master.
Verified
03b3a4549457c6a2b315dc64ef9b5364591cacc6

pin to v0.2

nnhomble committed 3 years ago
Verified
a618f76d1d94cd595c19536b3b3f840889b2f65e

Update Dockerfile

nnhomble committed 3 years ago
Unverified
d9c2d643ca9eb4ed0f61ad9a18b5fe725f2bcd5c

clearer group docs

nnhomble committed 4 years ago
Unverified
58754ea64662bca1e867da2b9f694c2fefe95733

clearer group docs

nnhomble committed 4 years ago
Unverified
b51a1b3285a14f552d83ef4c427f483c3272482d

clearer names

nnhomble committed 4 years ago
Verified
63605588a80c7bdee155400e3fb0f8fc773c0233

Merge pull request #2 from nhomble/allow-bot

nnhomble committed 4 years ago

README

The README file for this repository.

:toc: macro = groupme-notify-action

image:https://github.com/nhomble/groupme-notify-action/workflows/Linter/badge.svg[Linter]

[.lead] a github action to send groupme messages

toc::[]

== Examples This action supports two styles of messaging.

  1. You can create a link:https://dev.groupme.com/bots[bot] associated with that group and just invoke the bot apis with your token and botId.
  2. Directly with the GroupMe groupId and your access token, you can message a group with your identity.

We recommend you go with option (1) since you'll typically receive notifications on your GroupMe client from a bot but not from yourself.

name: groupme-notify on: [push]

jobs: groupme: runs-on: ubuntu-latest name: notify steps: - name: Checkout uses: actions/checkout@v2 - name: do notification as bot uses: nhomble/groupme-notify-action@v1 id: bot with: bot: ${{ secrets.YOUR_BOT_ID }} message: "It's a bot!" token: ${{ secrets.YOUR_API_KEY }}

name: groupme-notify on: [push]

jobs: groupme: runs-on: ubuntu-latest name: notify steps: - name: Checkout uses: actions/checkout@v2 - name: do notification uses: nhomble/groupme-notify-action@v1 id: notification with: group: ${{ secrets.YOUR_GROUP_ID }} message: 'Test notification!' token: ${{ secrets.YOUR_API_KEY }}

Note: you can define both the group and bot parameter in your yml. This action will give precedence to the bot mode so that group parameter will be ignored.

== GroupMe Specifics You will want to visit https://dev.groupme.com/docs/v3[GroupMe API] for exhaustive documentation.

=== How do I create a bot? Through the link:https://dev.groupme.com/bots[GroupMe Dev] portal, you can click the Create Bot button. From the UI, the Bot ID parameter is what you need to pass to this action.

=== What is the groupId? You'll need to perform a GET against the GroupMe APIs to find the groupId for the group you want. After you login, you can retrieve your access token from the UI.

Given your access token, you can get a list of all the groups you are a part of by doing: [source,bash]

$ TOKEN= $ curl
-H "Content-Type: application/json"
https://api.groupme.com/v3/groups?token=$TOKEN

What you care about is: [source,json]

{ "response": [ {"id": "", "name": "GitHub", "...": "..."}, {"id": "123456", "name": "Family", "...": "..."}, {"id": "789023", "name": "Friends", "...": "..."} ] }

Based off of the name, figure out the groupId you want to use and then put that into your action.yml.