Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vishreddy01 authored May 15, 2024
1 parent e2f0c93 commit 0edc786
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ODS_USER = os.environ["ODS_USER"]
ODS_PASSWORD = os.environ["ODS_PASSWORD"]
ODS_DB = os.environ["ODS_DB"]
GH_TOKEN_SECRET = os.environ["GH_TOKEN_SECRET"]
G_SECRET = os.environ["G_SECRET"]

except KeyError:
SOME_SECRET = "Token not available!"
Expand Down Expand Up @@ -87,7 +87,7 @@ def create_dag_definition(application):
#DAG = """{DAG}"""
DAG = str(DAG)

g = Github(GITHUB_TOKEN_SECRET)
g = Github(G_SECRET)
repo = g.get_repo('bcgov/nr-airflow')

repo.create_file(f'dags/{dag_id}.py', 'upload dags', DAG, branch='ui-testing')
Expand All @@ -112,7 +112,7 @@ def extract_names(input_list):

# Main function to orchestrate the process
def main():
g = Github(GITHUB_TOKEN_SECRET)
g = Github(G_SECRET)
repo = g.get_repo("bcgov/nr-airflow")
contents = repo.get_contents("/dags", ref="ui-testing")
existing_dags= [c.path for c in contents]
Expand Down

0 comments on commit 0edc786

Please sign in to comment.