|
1 |
| -# Slack Bot For Github |
2 |
| - |
3 |
| -This is a typical slack bot which uses Slack API to make the bot into conversation for newbies. |
4 |
| -Follow the steps and use @army_brat as prefix for the below commands. |
5 |
| - |
6 |
| -## Note |
| 1 | +# Slack Bot For Github Configuration Guide |
| 2 | +<!-- Place this tag where you want the button to render. --> |
| 3 | +<a class="github-button" href="https://github.com/Dhiraj240/Slack-Test" data-size="large" data-show-count="true" aria-label="Star Dhiraj240/Slack-Test on GitHub">Star</a> |
7 | 4 |
|
| 5 | +It is highly recommended to setup a virtual environment. |
| 6 | +You can follow [This link to install virtualenv!](https://virtualenv.pypa.io/en/latest/installation/) |
| 7 | +After that typein : |
8 | 8 | ```
|
9 |
| -We are using @army_brat as prefix so that bot can get a notification |
10 |
| -``` |
11 |
| -## New To Opensource |
| 9 | +virtualenv <-any environment-name-you-want> |
12 | 10 |
|
13 |
| -Write ``` @army_brat help ``` and read carefully. |
| 11 | +For me i wrote : |
| 12 | +virtualenv env |
| 13 | +``` |
14 | 14 |
|
15 |
| -###### Type in the commands accordingly: |
| 15 | +## Activate your environment |
16 | 16 |
|
17 |
| -1.Get invitation to our organisation |
18 |
| -``` |
19 |
| -@army_brat invite me |
20 | 17 | ```
|
21 |
| -2.Before gazing into issues look at our contribution guidelines |
| 18 | +env\scripts\activate |
22 | 19 | ```
|
23 |
| -@army_brat guide me |
24 |
| -``` |
25 |
| -3.Have a look at unassigned issues |
| 20 | +As my environment name was ```env``` so i used this prefix with above command. |
| 21 | +For you it can be anything :+1: |
| 22 | + |
| 23 | +## Install requirements |
| 24 | + |
26 | 25 | ```
|
27 |
| -@army_brat issues available |
| 26 | +pip install -r requirements.txt |
28 | 27 | ```
|
29 |
| -4.Else create a new issue |
| 28 | + |
| 29 | +## Set Slack Bot Token |
| 30 | + |
30 | 31 | ```
|
31 |
| -@army_brat create issue |
32 |
| -or |
33 |
| -/github open owner/repository |
| 32 | +set SLACK_BOT_TOKEN=xxxxxxxxx |
34 | 33 | ```
|
35 |
| -5.Open or Close an existing issue |
| 34 | +Here ```xxxxxxxxxx``` is your slack bot token |
| 35 | + |
| 36 | +## Run Below Script |
| 37 | + |
36 | 38 | ```
|
37 |
| -/github reopen <issue-link> |
38 |
| -or |
39 |
| -/github close <issue-link> |
| 39 | +python bot_id.py |
40 | 40 | ```
|
41 |
| -6.Ask any mentor to assign it for you |
| 41 | +You will get a ```BOT_ID``` which will be generated automatically by the above script. |
| 42 | + |
| 43 | +## Set BOT ID |
| 44 | + |
42 | 45 | ```
|
43 |
| -@army_brat assign issue |
| 46 | +set BOT_ID=xxxxx |
44 | 47 | ```
|
45 |
| -7.Use bot to save or copy what you type |
| 48 | +Here ```xxxxx``` is your generated BOT_ID from the above script |
| 49 | + |
| 50 | +## Run Below Script |
| 51 | + |
46 | 52 | ```
|
47 |
| -@army_brat copy <write-whatever-you-want> |
| 53 | +python army_brat.py |
48 | 54 | ```
|
| 55 | + |
| 56 | +## Join Slack And Play with ```@army_brat``` |
| 57 | + |
| 58 | +Add this bot to your channel and replace the code accordingly.Then head on to the link [BOT_COMMANDS_TO_BE_EXECUTED_ON_SLACK](https://github.com/Dhiraj240/Slack-Test/blob/master/Guidelines.md) |
| 59 | + |
| 60 | +## Note |
| 61 | + |
| 62 | +###### The commands you are executing must be done in a virtual environment because this project has different dependencies and if you do not follow it, then there may be the case that it can hamper your someother project. |
0 commit comments