Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Try Bot #29

Open
wants to merge 74 commits into
base: nixon
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
223ef7c
Added Functionality: /repo to list all repo inside indocom
albertsutz Sep 14, 2021
3d6ae5b
Initial Bot
CommanderW324 Sep 19, 2021
ab21ce9
Merge pull request #6 from indocom/nixon
CommanderW324 Sep 25, 2021
817535a
Merge branch 'main' of https://github.com/indocom/pinus-telebot into …
CommanderW324 Sep 25, 2021
75d173d
Update telebot_main.py
CommanderW324 Sep 25, 2021
bd41b1a
Added Job queue to repeteadly give 1 person PR updates
albertsutz Sep 25, 2021
6c8ce1a
Added Job queue to repeteadly give 1 person PR updates
albertsutz Sep 25, 2021
21309ea
Deployment to heroku initialized
CommanderW324 Sep 25, 2021
2c5abc4
Try
CommanderW324 Sep 25, 2021
46cc240
requirements.txt bukan requirement.txt
CommanderW324 Sep 25, 2021
57519aa
environment fix
CommanderW324 Sep 25, 2021
769fd43
Fixes UTC to GMT+8 conversion
albertsutz Sep 25, 2021
95874e6
Removed typo
albertsutz Sep 25, 2021
1fa6df8
Merge branch 'main' into extract-repo
albertsutz Sep 25, 2021
61e5126
Merge pull request #8 from indocom/extract-repo
CommanderW324 Sep 25, 2021
e806382
Added Broadcasting ability
albertsutz Sep 26, 2021
10c0f88
Assumes that there will not be more than 5 PRs every 5 mins
albertsutz Sep 26, 2021
79d1513
Merged Code
CommanderW324 Sep 26, 2021
cb9bcaa
Try Deployment again with repo list
CommanderW324 Sep 26, 2021
ead735b
added requirements.txt
CommanderW324 Sep 26, 2021
06c1b70
Change port number
CommanderW324 Sep 26, 2021
ce0b06f
corrected webhook call
CommanderW324 Sep 26, 2021
6bede55
Merge pull request #9 from indocom/branch-deployment
CommanderW324 Sep 26, 2021
8cc9873
set-up CSV and Add Repo
CommanderW324 Oct 3, 2021
dbc9fff
Added subscribe and status functionality
albertsutz Oct 3, 2021
586895d
Merge pull request #16 from indocom/broadcast-PR
CommanderW324 Oct 10, 2021
70dde25
Merged succesfully
CommanderW324 Oct 10, 2021
508bdc5
Added list Commands
CommanderW324 Oct 10, 2021
31566d0
Merge pull request #18 from indocom/branch-save-data
CommanderW324 Oct 10, 2021
88cdc69
Merge pull request #17 from indocom/nixon
CommanderW324 Oct 10, 2021
4162da2
Add command
nixonwidjaja Oct 10, 2021
a1daac2
Add command
nixonwidjaja Oct 12, 2021
11454cc
Improved broadcast and new_pull_request to send personalized message
albertsutz Oct 17, 2021
340faa3
Fixes some typo
albertsutz Oct 17, 2021
5826a88
Merge pull request #19 from indocom/personalized_new_repo
CommanderW324 Oct 17, 2021
46cd105
Delete and unique Key
CommanderW324 Oct 17, 2021
71b6c46
Deploying
CommanderW324 Oct 17, 2021
0e4176b
Updated Requirements.txt
CommanderW324 Oct 17, 2021
0094436
Change to http webhook
CommanderW324 Oct 17, 2021
a3c7707
Reminder Calendar
CommanderW324 Oct 20, 2021
fd1df2a
Add event
nixonwidjaja Oct 24, 2021
367e7b4
Add event
nixonwidjaja Oct 24, 2021
e9c945c
Add events
nixonwidjaja Oct 25, 2021
e28fd8c
Reminder
nixonwidjaja Oct 25, 2021
5a97f45
Fixed DropBox API
CommanderW324 Dec 5, 2021
9252f1f
Merge branch 'main' into delete_deploy
CommanderW324 Dec 7, 2021
2409d80
Merge pull request #21 from indocom/delete_deploy
CommanderW324 Dec 7, 2021
efda500
Deploy time
CommanderW324 Dec 7, 2021
3be58bc
Requirements.txt
CommanderW324 Dec 10, 2021
ba91716
Fixed Requirements
CommanderW324 Dec 10, 2021
1f8590d
Cleaned up some parts of the code & Deploying
CommanderW324 Dec 12, 2021
b78886b
Try Credentails Deployment
CommanderW324 Dec 12, 2021
df2288f
Try Again
CommanderW324 Dec 12, 2021
baa9437
Try
CommanderW324 Dec 12, 2021
a2a583c
Auth
CommanderW324 Dec 12, 2021
96a809d
Added Requirements
CommanderW324 Dec 12, 2021
27191ef
Fixed Requirements and Main
CommanderW324 Dec 12, 2021
68f0c75
Try Agian
CommanderW324 Dec 12, 2021
7606868
JSon fix
CommanderW324 Dec 12, 2021
af6085d
Import statement
CommanderW324 Dec 12, 2021
a0e789f
Trying
CommanderW324 Dec 12, 2021
eb2f873
GoogleCredentials
CommanderW324 Dec 12, 2021
1b3e581
Cleaning up code
CommanderW324 Dec 12, 2021
433322a
Merge
CommanderW324 Dec 12, 2021
9d4c16a
Merge pull request #23 from indocom/branch-deploycalendar
CommanderW324 Dec 12, 2021
59b4d8e
Finalizing
CommanderW324 Dec 12, 2021
4d77fdd
Removed Unnecessary Files
CommanderW324 Dec 12, 2021
fe8b3a0
Added Requirements and Readme
CommanderW324 Dec 12, 2021
e0cd49b
Fixed Requirements.txt
CommanderW324 Dec 12, 2021
d1926e9
Fixed Bug
CommanderW324 Dec 12, 2021
676f3b2
Deploy Bot
CommanderW324 Dec 12, 2021
a717a55
Uncommented Lines
CommanderW324 Dec 12, 2021
5007102
Fixed Deploy URL
CommanderW324 Dec 12, 2021
a2d228d
Update README.md
CommanderW324 Dec 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.env
*.pyc
*.json
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: python telebot_main.py
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# pinus-telebot
# pinus-telebot

Steps to set-up development:
1. Get a Bot-API-Token from BotFather in Telegram
2. Get Dropbox API Token from Dropbox Account
3. Get Google API Credentials from Google API
4. Create a .env file that contains the following:
1. BOT_API_TOKEN='Fill with Token'
2. DROPBOX_API_TOKEN='Fill With Token'
3. GOOGLE_APPLICATION_CREDENTIALS=google-credentials.json
4. DEPLOY_URL=https://pinus-telegram-bot.herokuapp.com/


Deployment:
1.Heroku create on CLI
1.Add the following 2 buildpacks on Heroku:
1.https://github.com/gerywahyunugraha/heroku-google-application-credentials-buildpack
1.https://github.com/heroku/heroku-buildpack-python
2.Set up the config variables (BOT_API_TOKEN, DROPBOX_API_TOKEN, and GOOGLE_APPLICATION_CREDENTIALS=google-credentials.json, and GOOGLE_CREDENTIALS='Fill with JSON Content of google API Credentials Token')
25 changes: 25 additions & 0 deletions csv_handler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import csv
#read CSV from file, stores it in dictionary with key of row number and value of list of the row values.
def readCSVfromFile(csv_file_path) :
storage = dict()
with open(csv_file_path) as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
line_count = 0
for row in csv_reader:
if line_count > 0 :
storage[line_count - 1] = row;
line_count += 1
print(f'Processed {line_count} lines.')
return storage
#Write into CSV file with the fieldname parameter being the first row
def writeToCSV(csv_file_path, storage, fieldname) :
with open(csv_file_path, mode='w', newline='') as csv_file:
writer = csv.writer(csv_file, delimiter=',')
length = len(storage)
writer.writerow(fieldname)
for i in storage:
writer.writerow(storage[i])




Empty file added events.txt
Empty file.
8 changes: 8 additions & 0 deletions events_subscription.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
id,keyword
1728246253,telebot
1728246253,pinus
1141961290,pinus
176037276,pinus
176037276,telebot
176037276,something
1141961290,telebot
59 changes: 0 additions & 59 deletions quickstart.py

This file was deleted.

5 changes: 5 additions & 0 deletions repo_list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
chat_id,owner_name,repo_url
176037276,Albertsutz,https://github.com/indocom/gapura
176037276,Albertsutz,https://github.com/indocom/lumina
176037276,Albertsutz,https://github.com/indocom/pinus-telebot
176037276,Albertsutz,https://github.com/indocom/pinus-client
14 changes: 0 additions & 14 deletions requirement.txt

This file was deleted.

12 changes: 12 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
python-telegram-bot==12.7
dropbox
requests
requests-oauthlib==1.3.0
google-api-core==2.0.1
google-api-python-client==2.22.0
google-auth==2.1.0
google-auth-httplib2==0.1.0
google-auth-oauthlib==0.4.6
oauth2client
python-dotenv

101 changes: 0 additions & 101 deletions simplereminder.py

This file was deleted.

Loading