Skip to content

Commit

Permalink
move git user to the .env files
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisPeriquet committed Nov 4, 2024
1 parent 0a7deea commit 7cdfc65
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,12 @@ def git_jira_api(request):
if not jira_test_mode_value or 'true' in jira_test_mode_value.lower():
jira_test_mode = True

# FIXME: This is a temporary setting during development; it will eventually be openshift-eng
git_user = "DennisPeriquet"
git_user = os.getenv("GIT_USER")
if not git_user:
return Response({
"status": "failure",
"error": "git user not in GIT_USER environment variable"
}, status=500)

if git_test_mode:
# Just create a success status and fake PR without using the git API
Expand Down
3 changes: 3 additions & 0 deletions conf/dev.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ MYSQL_USER=root
MYSQL_PASSWORD=secret
MYSQL_CONNECTION_PORT=3306

# git user for ocp-build-data
# User any user that has a valid ocp-build-data repo and where you can get a git token
GIT_USER="DennisPeriquet"
3 changes: 3 additions & 0 deletions conf/prod.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ MYSQL_CONNECTION_PORT=3306
# Kerberos
KERBEROS_KEYTAB=/tmp/keytab/keytab
KERBEROS_PRINCIPAL=[email protected]

# git user for ocp-build-data
GIT_USER="openshift-eng"

0 comments on commit 7cdfc65

Please sign in to comment.