https://github.com/lesmiscore/issutter
Use Twitter from GitHub's Issue
https://github.com/lesmiscore/issutter
Last synced: about 2 months ago
JSON representation
Use Twitter from GitHub's Issue
- Host: GitHub
- URL: https://github.com/lesmiscore/issutter
- Owner: Lesmiscore
- License: apache-2.0
- Created: 2017-11-30T09:46:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-02T06:24:42.000Z (over 8 years ago)
- Last Synced: 2025-03-18T20:51:05.634Z (about 1 year ago)
- Language: Groovy
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Issutter
Use Twitter from GitHub's Issue
# Usage
## Launch Webhook server
1. `git clone https://github.com/nao20010128nao/Issutter`
2. `./dep.sh` (Required only one time)
3. Decide a secret password
4. Hash it with `echo | sha256d`
5. Edit line 12 of `webhook.groovy`
6. `./webhook.groovy`
7. The server will start on port 8080
## Get Twitter OAuth token
Go to [`api.twitter.com`](https://api.twitter.com) to get one.
You will need `Consumer Key`, `Consumer Secret`, `Access Token`, and `Access Token Secret`.
## Create a GitHub repository with `README` or `LICENSE`
You need at least one file because `Issues` won't appear without commits.
## Configure GitHub webhook
1. Go `Settings` -> `Webhook` on the repository
### Run when Issue is created
1. The URL should be:
`http:///created?check=&githubUser=&githubPass=&twitterAk=&twitterAs=&twitterCk=&twitterCs=`
2. Type anything for `Secret`
3. Choose only `Issues` for events.
### Run when Issue is commented
1. The URL should be:
`http:///commented?check=&githubUser=&githubPass=&twitterAk=&twitterAs=&twitterCk=&twitterCs=`
2. Type anything for `Secret`
3. Choose only `Issue Comments` for events.
# What to Issue
The text will be parsed as Markdown and all styles will be **stripped**.
You need to put one command per issue/comment.
Any errors and results will be notified as a Issue comment.
The Issue text and comment is basically consist of following structure:
```
```
You need at least 2 spaces to break a line, like this Markdown does.
`{CONSTANT}` means a constant text.
`` means required text.
`[OPTIONAL]` means optional text.
## Check my timeline
```
{timeline}
[N]
```
`N` means number of tweets to display. Default is `20`.
## Check my last N tweets
```
{mylast}
[N]
```
`N` means number of tweets to display. Default is `20`.
## Single Tweet
```
{tweet}
```
`TEXT` means a text to tweet.
## Do multiple tweet and chain as replies
```
{rentwi}
{%%%%%%%...}
{%%%%%%%...}
...
```
`TEXT` means a text to tweet.
`%%%%%%%...` means end of a tweet. Requires more than 3 character of `%`.
Repeat `TEXT` and `%%%%%%%...` to do multiple tweet.
## Check someone's last N tweets
```
{oneslast}
[N]
```
`ACCOUNT` means an account to display.
`N` means number of tweets to display. Default is `20`.