Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ksmnetwork/GitQL
Polkadot binary updater with Github GraphQL API v4, JQ, CURL and without Git
https://github.com/ksmnetwork/GitQL
Last synced: about 1 month ago
JSON representation
Polkadot binary updater with Github GraphQL API v4, JQ, CURL and without Git
- Host: GitHub
- URL: https://github.com/ksmnetwork/GitQL
- Owner: ksmnetwork
- Created: 2021-12-12T19:14:00.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-13T12:36:11.000Z (almost 3 years ago)
- Last Synced: 2024-08-02T19:33:01.678Z (4 months ago)
- Language: Shell
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-dot - GitQL - A basic script that will check the latest Polkadot release. (Libraries / Multisig Wallets)
README
# GitQL
#### Polkadot binary updater with Github GraphQL API v4, JQ, CURL and without GitA basic script that will check the latest Polkadot release TAG version commited and it's status as "Latest, Draft, Pre-Release"
if all the conditions are fulfilled it will do a secondary check if a binary file exist, then it will download, backup, restart and wait to see the application status.Outputs are outputed to the journald, will suggest "Grafana, Loki and Promtail".
- [KUSAMA Validator Simple Monitoring](https://github.com/ksmnetwork/kusama-promtail)Dependencies:
- CURL apt/yum install -y curl
- JQ apt/yum install -y jq
- GitHUB API TOKENSteps:
- Creating a personal access token in GitHUB and add it as environment variable ( GAUTH='Authorization: Bearer ' )
- To match the behavior of the GraphQL Explorer, request the following scopes:
- - public_repo
- Since we are using the first positional parameter to include local file for our query ( --data "@$1" )
- Run it with './gitCron.sh latest.query'
- - NOTE: for CRON use '/etc/environment' for the environment variablesOthers:
- Same TOKEN and QUERY can be used with Grafana it self by adding GraphQL Plugin and outhorise to 'https://api.github.com/graphql' in the options
- - Grafana Alerting && OnCall compatible
- Ract + Apollo + NextJS for your pocket app.```
import Head from 'next/head'
import { setContext } from '@apollo/client/link/context';
import { ApolloClient, InMemoryCache, createHttpLink, gql } from "@apollo/client";export default function Home({repository}) {
return ({repository.latestRelease.tagName})
}export async function getStaticProps() {
const httpLink = createHttpLink({ uri: 'https://api.github.com/graphql' });
const authLink = setContext((_, { headers }) => {
return { headers: { ...headers, authorization: `Bearer ` } }
});
const client = new ApolloClient({
link: authLink.concat(httpLink),
cache: new InMemoryCache()
});
const {data} = await client.query({
query: gql`
{
repository(owner: "paritytech", name: "polkadot", followRenames: true) {
latestRelease { tagName }
}
}
`
});
const { repository } = data;return {
props: { repository }
}
}
```
# For Support && Nominations
- Display name. KSMNETWORK && KSMNETWORK-WEST
- Email [email protected]
- Riot @gtoocool:matrix.org- KUSAMA (KSM) Address
- ```H1bSKJxoxzxYRCdGQutVqFGeW7xU3AcN6vyEdZBU7Qb1rsZ```- PolkaDOT (DOT) Address:
- ```15FxvBFDd3X7H9qcMGqsiuvFYEg4D3mBoTA2LQufreysTHKA```- https://ksm.network