Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement API #18

Open
tadhglewis opened this issue Jun 14, 2020 · 3 comments
Open

Implement API #18

tadhglewis opened this issue Jun 14, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@tadhglewis
Copy link
Owner

tadhglewis commented Jun 14, 2020

It would be nice to have a node API which can easily be run on a server to handle automating Component / Incident reporting, currently reporting is manual, using a service or the GitHub API directly to add/edit components and incidents

An API wrapper for the GitHub API which will expose simplified endpoints to help integrate with services. Example listens for requests on https://example.com/CDN?status=major outage and updates the current label for CDN to major outage

If you are interested in this GitHub Issue leave a comment so I can put this as priority.

@tadhglewis tadhglewis self-assigned this Jun 14, 2020
@tadhglewis tadhglewis added the enhancement New feature or request label Jun 14, 2020
@mhzawadi
Copy link

mhzawadi commented Sep 7, 2021

That would really help

@MeesJ
Copy link

MeesJ commented Dec 7, 2021

This would be very useful

@mhzawadi
Copy link

if it helps anyone, I wrote a shell script to update an issue with a label to help automate alerts from nagios

#/bin/sh

if [ $# -lt 2]
then
  echo "Missing options"
  echo "$0 <SERVICESTATEID> <SERVICENOTESURL>"
  exit 1
else
  STATUSID=$1
  ISSUEID=$2
fi

case ${STATUSID} in
  0)
    ISSUELABEL='operational'
    ;;
  1)
    ISSUELABEL='partial outage'
    ;;
  2)
    ISSUELABEL='major outage'
    ;;
  3)
    ISSUELABEL='major outage'
    ;;


curl -L \
  -X PATCH \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <GITHUB_TOKEN_HERE>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  ${ISSUEID} \
  -d "{\"labels\":[\"component\",\"issue status\",\"$ISSUELABEL\"]}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants