semaphoreci / api Goto Github PK
View Code? Open in Web Editor NEWSemaphore 2.0 Public API
Semaphore 2.0 Public API
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://instantlabs.semaphoreci.com/api/v1alpha/plumber-workflows?project_id=8ba6c38a-3c71-42b3-80bc-0d2d3571bacd"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "Token **xxxxxxxxxxxxxxx**")
req.Header.Add("content-type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
OUTPUT:
&{400 Bad Request 400 HTTP/2.0 2 0 map[Via:[1.1 google] Alt-Svc:[clear] Cache-Control:[max-age=0, private, must-revalidate] Content-Length:[170] Date:[Tue, 08 Sep 2020 17:25:41 GMT] Server:[envoy] X-Envoy-Upstream-Service-Time:[1]] {0xc000102500} 170 [] false false map[] 0xc0000d4000 0xc00014a160}
{"message": "Call rejected because the client is outdated. To continue, upgrade Semaphore CLI with 'curl https://storage.googleapis.com/sem-cli-releases/get.sh | bash'."}
I love having slack notifications for semaphore builds, but I am getting spammed by "pass" messages. I could filter out passing messages, but then I wouldn't know if failures are fixed. What I'd really like is an option "recovered", so I can get messages on failures, and on passes after failures, and skip other passes. Is that possible?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.