This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from "react"; | |
import ReactDOM from "react-dom"; | |
import axios from "axios"; | |
function useAxios(fetchAction) { | |
useEffect(() => { | |
const signal = axios.CancelToken.source(); | |
fetchAction({ signal }); | |
return () => { | |
signal.cancel("Api is being canceled"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description | |
# A Hubot script managing Github issues | |
# You need acquire a token first: | |
# $ curl -i https://api.github.com/authorizations -d '{"note":"githubot","scopes":["repo"]}' -u "yourusername" | |
# $ export HUBOT_GITHUB_TOEKN=token_value | |
# | |
# Commands: | |
# hubot issue list - list up issues | |
# hubot issue create <title> body <content> - create an issue with a body | |
# hubot issue close <number> - close an issue |