Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

[pull] contributor-branch/pokurt-pr-1 from master #29

Open
wants to merge 89 commits into
base: contributor-branch/pokurt-pr-1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
e8b4f43
fixed ytdl issues.
Aug 10, 2020
2fa1647
[github/security] Add codeql-analysis checks
Aug 11, 2020
5163108
[github/pull] Merge upstream changes into our fork
Aug 11, 2020
24ea5e8
[cirrus-ci] Update the config file
RecapTimeSquad Aug 12, 2020
5c32683
[cirrus-ci] Try to deploy code to Herokuwu
RecapTimeSquad Aug 12, 2020
b05dabc
[cirrus-ci] The CI failed to run.
RecapTimeSquad Aug 12, 2020
2f45058
[cirrus-ci] RTFM.
RecapTimeSquad Aug 12, 2020
70d1bd5
[cirrus-ci] Make the publish task only triggered manually.
RecapTimeSquad Aug 12, 2020
be4f593
[cirrus-ci] Bruh.
RecapTimeSquad Aug 12, 2020
faba1ae
Update .cirrus.yml
RecapTimeSquad Aug 12, 2020
deb60db
Added Reveal
Aug 13, 2020
7a8c799
[github/pull] Merge upstream changes into our fork
Aug 14, 2020
ed356a7
[cirrus-ci] Press F.
Aug 14, 2020
eda6072
[cirrus-ci] Fix YAML formatting issues
Aug 14, 2020
9c66d01
[cirrus-ci] Resolve the problem by configuring the containner
RecapTimeSquad Aug 14, 2020
0f2a5c2
[cirrus-ci] Mispelled 'container' with 'containner'
RecapTimeSquad Aug 14, 2020
ed4ad4d
Update .cirrus.yml
RecapTimeSquad Aug 14, 2020
a5586e8
[cirus-ci] Heroku Git issues were fixed
Aug 15, 2020
bbcf66f
[inline-mode] Updated some strings kek.
Aug 15, 2020
f44839d
[cirrus-ci] Updated the config file, kek.
Aug 15, 2020
b495949
added sudo support for assistant's inline
Aug 21, 2020
40d165b
Merge pull request #27 from pokurt/master
Aug 21, 2020
5a2f2a7
test mode
Aug 22, 2020
50ed733
Revert "test mode"
Aug 22, 2020
568f2a6
Lightweighting v1
Aug 22, 2020
98d5485
New Eval method
Aug 22, 2020
6c7b684
[pull] Merge branch 'master' of https://github.com/pokurt/Nana-Remix
Aug 24, 2020
56f8336
[modules/devs] Updated stuff in 'reveal' command
Aug 24, 2020
b1e66ab
[github/pull] Blah blah blah
Aug 24, 2020
809d529
Merge to Master (#29)
CustomIcon Sep 2, 2020
d2a11f9
#bugfix
Sep 2, 2020
750311e
fixed user cllient not starting errors
Sep 2, 2020
acd9a4f
cleanup
Sep 5, 2020
9724d8f
removed unused ffmpeg buildpack
Sep 5, 2020
24715e0
Nana: Fix and Re-enable kang (Sourcery refactored) (#33)
sourcery-ai[bot] Sep 9, 2020
23fe896
Mega Update (#34)
CustomIcon Sep 19, 2020
e1aa0b4
Re-enabled sudo for dev module (#37)
HiddenCrush Sep 27, 2020
fd076bb
Merging the branch (#39)
CustomIcon Sep 28, 2020
c42c4e5
[pull] Merge branch 'master' of https://github.com/pokurt/Nana-Remix …
Oct 11, 2020
5c7fd4d
[repo] Update README to include link to docs [SKIP CI]
Oct 11, 2020
f072d54
[github/security] Add codacy-analysis checks
Oct 13, 2020
29347bc
Create Dependabot config file
dependabot-preview[bot] Oct 15, 2020
9c7a8d8
removed unused ffmpeg buildpack
Sep 5, 2020
2681579
Nana: Fix and Re-enable kang (Sourcery refactored) (#33)
sourcery-ai[bot] Sep 9, 2020
0833bc3
Mega Update (#34)
CustomIcon Sep 19, 2020
7f218ff
Re-enabled sudo for dev module (#37)
HiddenCrush Sep 27, 2020
9a51b6a
Merging the branch (#39)
CustomIcon Sep 28, 2020
650409b
updated to docker 3.9.0 (#43)
CustomIcon Oct 13, 2020
82210ab
Fixed Dockerfile (test)
CustomIcon Oct 13, 2020
1b716d8
fixed dependencies in dockerfile
CustomIcon Oct 13, 2020
f33dd30
removed unwanted dependencies
CustomIcon Oct 13, 2020
c5111ac
downgraded to 3.8.4
CustomIcon Oct 13, 2020
25d0a7b
admins and ytdl updated (#45)
CustomIcon Oct 25, 2020
d44d89f
Dev (#46)
CustomIcon Oct 25, 2020
5aa5c60
Merge pull request #37 from MadeByThePinsHub/dependabot/add-v2-config…
Oct 28, 2020
07d16ba
Dev (#49)
CustomIcon Nov 9, 2020
8cc6ff3
Heroku Fix (test)
CustomIcon Nov 11, 2020
a63fdea
Revert "Heroku Fix (test)"
CustomIcon Nov 11, 2020
72eb6be
Add a `RUN rm README.md` cus heroku checks readme and bans. (#51)
Dank-del Nov 16, 2020
cd821b2
Update en-US.yml (#52)
breakdowns Nov 16, 2020
6c011ae
Fixed (#53)
CustomIcon Nov 16, 2020
84ccb17
Add neofetch and fakeroot to Dockerfile. (#57)
Nov 19, 2020
d9666de
Merging Dev into Master (#58)
CustomIcon Nov 20, 2020
59399a0
add hebrew translation (#60)
iiiiii1wepfj Nov 20, 2020
ee6fde3
Added Indonesian language (#59)
breakdowns Nov 20, 2020
206384b
new languages
CustomIcon Nov 20, 2020
039a610
minor fixes
CustomIcon Nov 20, 2020
0c52499
Update Dockerfile (#62)
iiiiii1wepfj Nov 20, 2020
b1b8678
Added missing var from app.json
CustomIcon Nov 20, 2020
1c98ea1
Merge branch 'master' of https://github.com/pokurt/Nana-Remix
CustomIcon Nov 20, 2020
b78d593
Translations (#69)
CustomIcon Nov 20, 2020
6e2d228
Updated Credits
CustomIcon Nov 21, 2020
df709aa
Translations (#79)
CustomIcon Nov 30, 2020
49ab7f0
Version Bump & fixes (#80)
CustomIcon Dec 5, 2020
4b6a9dd
Translations (#81)
CustomIcon Dec 7, 2020
8482cab
removed unused modules
CustomIcon Dec 7, 2020
6ce4088
Introduction to config.ini (#85)
CustomIcon Dec 9, 2020
db7db00
Dev (#93)
CustomIcon Dec 17, 2020
43dd849
Translations (#98)
CustomIcon Dec 28, 2020
41a35ec
Nana-Remix v3.2 (#101)
CustomIcon Jan 1, 2021
69d55fa
Updated to v3.2
CustomIcon Jan 1, 2021
8d10285
Updated to 3.2.1 (#105)
CustomIcon Jan 9, 2021
5ec27fc
Updated Pyrogram & Fixed Existing Builds (#108)
CustomIcon Jan 10, 2021
dac1a87
Version 3.2.2 (#109)
CustomIcon Jan 14, 2021
4e68737
tracemoepy version error
CustomIcon Jan 14, 2021
dbd6d93
[github/pull] Merge branch 'master' of https://github.com/pokurt/Nana…
Feb 16, 2021
cf8b4d3
merge-conflicts: Fixed some shitty merge conflicts
Feb 20, 2021
ae309b1
cirrus: Sorry, but RIP Heroku
Feb 20, 2021
067f447
remove duplicates in dockerifle
Feb 21, 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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
# build the application image
- run: docker build -t nana/bot:v1.0 .
# # run the docker image
# - run: docker run -e ENV=Yes -e TEST_DEVELOP=True -e api_id=$api_id -e api_hash=$api_hash -e DB_URI=$DB_URI -e ASSISTANT_BOT_TOKEN=$ASSISTANT_BOT_TOKEN -e AdminSettings=$AdminSettings -e USERBOT_SESSION=$USERBOT_SESSION -e ASSISTANT_SESSION=$ASSISTANT_SESSION nana/bot:v1.0
# - run: docker run -e ENV=Yes -e TEST_DEVELOP=True -e api_id=$api_id -e api_hash=$api_hash -e DB_URI=$DB_URI -e ASSISTANT_BOT_TOKEN=$ASSISTANT_BOT_TOKEN -e AdminSettings=$AdminSettings -e USERBOT_SESSION=$USERBOT_SESSION -e ASSISTANT_SESSION=$ASSISTANT_SESSION nana/bot:v1.0
39 changes: 32 additions & 7 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,47 @@
docker_builder:
name: Build and push Docker image to Docker Hub
timeout_in: 95m
# If you forked the repo and want to use Cirrus CI to build and push image to Docker Hub,
# change "MadeByThePinsHub" below into your personal account username or your GitHub org username.
only_if: $CIRRUS_BRANCH == "master" && $CIRRUS_REPO_OWNER == "MadeByThePinsHub"
skip: "!changesInclude('.cirrus.yml', '**.{py}', 'Dockerfile')"
skip: "!changesInclude('.cirrus.yml', '**.{py}', 'Dockerfile', '**/*nana*/**')"
env:
# For forks, change this var into your own Docker Hub username, must be an service account.
DOCKERHUB_USERNAME: thepinsteam
# Only repos that are owned by the Pins team can use the access key.
# Please generate a new encrypted var on https://cirrus-ci.com/settings/github/your-username-here and
# Only repos that are owned by the Pins team can use the Docker Hub access key.
# Please generate a new encrypted var on https://cirrus-ci.com/settings/github/your-orgusername-here and
# replace the value below with yours.
DOCKERHUB_ACCESS_KEY: ENCRYPTED[!e15bc943a38e23531fd9f7729d3a0f51bf38ea1e15c081b93b5685a6ffe576375154eee1e716c595ac2f076e38c40433!]
build_script: docker build --tag thepinsteam/nana-remix .
# For forks, change this var below into your desired Docker image name.
# If you want to push your image outside Docker Hub, see the docs for your registry.
DOCKERHUB_IMAGE_TAG: thepinsteam/nana-remix
build_script: docker build --tag $DOCKERHUB_IMAGE_TAG .
login_script: docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_ACCESS_KEY
push_script: docker push thepinsteam/nana-remix
push_script: docker push $DOCKERHUB_IMAGE_TAG

docker_builder:
name: Only build Docker image
timeout_in: 95m
only_if: $CIRRUS_BRANCH != "master"
skip: "!changesInclude('.cirrus.yml', '**.{py}', 'Dockerfile')"
build_script: docker build --tag thepinsteam/nana-remix:TEST-BUILDS .
skip: "!changesInclude('.cirrus.yml', '**.{py}', 'Dockerfile', '**/*nana*/**')"
build_script: docker build .

# Heroku deployment using the 'git push' way.
# Comment lines 30-45 if you don't use Heroku.
publish_task:
name: Push latest commits to Heroku.
only_if: $BRANCH == 'master'
container:
image: alpine/git:latest
env:
# Only people with write access to this repo can decrypt the values of these encrypted values.
# Please generate a new encrypted var on your Cirrus CI settings for your repo and
# replace the value below with yours.
HEROKU_API_KEY: ENCRYPTED[2b680a6cd5ba5be5ec156f0159039d9a58afae2307ed325bab4e8edf13ced624224c505b59d4af1f38ef25b9d229078d]
HEROKU_APP_NAME: ENCRYPTED[0914901577755ca103a67e8d615bc0e9707319347f8274f4425751b51452bda90930d33210970359ade8a74cff984cbe]
script: |
#git remote add heroku https://api:${HEROKU_API_KEY}@git.heroku.com/${HEROKU_APP_NAME}.git && git fetch --all
#git branch -u heroku/master && git status
#git push
echo "Deployment to Heroku is disabled due to P2P bullshit."
echo "Use Zeet or whatever."
8 changes: 0 additions & 8 deletions .deepsource.toml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
9 changes: 9 additions & 0 deletions .github/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@ rules:
- ThePinsTeam
reviewers:
- AndreiJirohHaliliDev2006

# Config for our PR.
- base: contributor-branch/pokurt-pr-1
upstream: master
mergeMethod: merge
assignees:
- ThePinsTeam
reviewers:
- AndreiJirohHaliliDev2006
label: ":arrow_heading_down: pull"
44 changes: 44 additions & 0 deletions .github/workflows/codacy-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature. For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.

name: Codacy Security Scan

on:
push:
branches: [ "master", "main" ]
pull_request:
branches: [ "master", "main" ]

jobs:
codacy-security-scan:
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v2

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/[email protected]
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: results.sarif
48 changes: 48 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "CodeQL"

on:
push:
branches: [master, "contributor-branch/*"]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 20 * * *'

jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: python

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ coverage.xml
*.pot

# Django stuff:
*.log
*.txt
local_settings.py
db.sqlite3

Expand Down Expand Up @@ -122,6 +122,12 @@ nana/modules/test_admin.py
.idea/Nana-Remix.iml
.idea/dictionaries/Aman.xml


# Session files
nana/session/*.session
!nana/session/README.md
!nana/session/README.md
*.session
*.session-journal
config.ini
*.ttf
*.jpg
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

29 changes: 29 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: debug-statements
- id: double-quote-string-fixer
- id: requirements-txt-fixer
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies: [flake8-typing-imports==1.7.0]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.5.4
hooks:
- id: autopep8
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.0.1
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.4
hooks:
- id: pyupgrade
args: [--py36-plus]
32 changes: 11 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# We're using Debian Slim Buster image
FROM python:3.8.4-slim-buster
FROM python:3.9.0-slim-buster

ENV PIP_NO_CACHE_DIR 1
ENV DEBIAN_FRONTEND noninteractive
Expand All @@ -12,9 +12,7 @@ RUN apt update && apt upgrade -y && \
debian-keyring \
debian-archive-keyring \
bash \
bzip2 \
curl \
figlet \
git \
util-linux \
libffi-dev \
Expand All @@ -25,55 +23,47 @@ RUN apt update && apt upgrade -y && \
musl-dev \
musl \
neofetch \
php-pgsql \
python3-lxml \
postgresql \
postgresql-client \
python3-psycopg2 \
libpq-dev \
libcurl4-openssl-dev \
libxml2-dev \
libxslt1-dev \
python3-pip \
python3-requests \
python3-sqlalchemy \
python3-tz \
python3-aiohttp \
openssl \
pv \
jq \
wget \
python3 \
python3-dev \
libreadline-dev \
libyaml-dev \
gcc \
sqlite3 \
libsqlite3-dev \
sudo \
zlib1g \
ffmpeg \
libssl-dev \
libgconf-2-4 \
libxi6 \
zlib1g-dev \
xvfb \
unzip \
make \
libopus0 \
libopus-dev \
gcc \
&& rm -rf /var/lib/apt/lists /var/cache/apt/archives /tmp

# Pypi package Repo upgrade
RUN pip3 install --upgrade pip setuptools wheel

# Clone the fork to the workspace folder.
RUN git clone https://github.com/AndreiJirohHaliliDev2006/Nana-Remix /app
RUN git clone https://github.com/MadeByThePinsHub/Nana-Remix /app
WORKDIR /app

# Update Path
ENV PATH="/home/userbot/bin:$PATH"
# Use env vars by default, because we're using Docker
# containners after all.
ENV ENV True

# Install requirements
RUN pip3 install -U -r requirements.txt
# Install deps using our Makefile
RUN make install

# Starting Worker
CMD ["python3","-m","nana"]
CMD ["make","run"]
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
Copyright (C) 2021 <poki> [email protected]

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

<program> Copyright (C) <year> <name of author>
Nana-Remix Copyright (C) 2021 <poki> [email protected]
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test:
@pre-commit run --all-files

install:
@pip3 install -r requirements.txt

run:
@python3 -m nana

update:
@git pull
@pip3 install -U -r requirements.txt
1 change: 0 additions & 1 deletion Procfile

This file was deleted.

Loading