Skip to content

Commit be18ae1

Browse files
authored
Merge pull request #81 from oss-slu/codeAudit
Backend Completed - Code Audit
2 parents 0aabce5 + 49fac42 commit be18ae1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+4437
-236
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Python compilation files
2+
**/__pycache__/
3+
**/*.pyc
4+
5+
# React/Node files
6+
**/node_modules/
7+
**/dist/
8+
9+
# Environment variables
10+
.env
11+
Backend/config/.envex

Backend/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .config.configs import GIT_TOKEN
2+
3+
__all__ = ["GIT_TOKEN"]
236 Bytes
Binary file not shown.
3.46 KB
Binary file not shown.

Backend/config/.envex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PLACE .ENV STUFF HERE
497 Bytes
Binary file not shown.

Backend/config/configs.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from configparser import ConfigParser
2+
import os
3+
from dotenv import load_dotenv
4+
5+
6+
#Getting API Token to be used in other files
7+
load_dotenv()
8+
GIT_TOKEN = os.getenv('GITHUB_TOKEN')
9+
10+
if not GIT_TOKEN:
11+
raise ValueError("GIT_TOKEN not found! Please set it in .env file")
12+
4.55 KB
Binary file not shown.
3.13 KB
Binary file not shown.
3.63 KB
Binary file not shown.

0 commit comments

Comments
 (0)