Skip to content

Commit

Permalink
Move the configs directory to the root
Browse files Browse the repository at this point in the history
  • Loading branch information
suhaibmujahid committed Apr 29, 2023
1 parent 923c72d commit cacdd65
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 18 deletions.
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
*.pyc
*~
.DS_Store
scripts/configs/config.json
bugbot/scripts/configs/*
!bugbot/scripts/configs/tools.json
!bugbot/scripts/configs/*round_robin.json
!bugbot/scripts/configs/rm.json
!bugbot/scripts/configs/team_managers.json
configs/*
!configs/tools.json
!configs/rm.json
!configs/team_managers.json
models/
venv/
venv2/
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Before running:

.. code-block:: json
# in scripts/configs/config.json
# in configs/config.json
{
"ldap_username": "[email protected]",
"ldap_password": "xxxxxxxxxxxxxx",
Expand Down Expand Up @@ -103,7 +103,7 @@ The person requesting the round robin schedule must provide the URL of the calen

In the calendar, the summary of the events must be the full name (eventually prefixed with text between square brackets) of triage owner as it appears in Phonebook, e.g. `[Gfx Triage] Foo Bar` or just `Foo Bar`.

And then you just have to add an entry in `bugbot/scripts/config/tools.json <https://github.com/mozilla/relman-auto-nag/blob/333ec164ba5c3ceebf3c39cf84196fa35c667b1b/bugbot/scripts/configs/tools.json#L2>`_ in the round-robin section.
And then you just have to add an entry in `configs/tools.json <https://github.com/mozilla/relman-auto-nag/blob/333ec164ba5c3ceebf3c39cf84196fa35c667b1b/configs/tools.json#L2>`_ in the round-robin section.

Once everything is set-up you can make a PR similar too https://github.com/mozilla/relman-auto-nag/pull/858/files

Expand Down
2 changes: 1 addition & 1 deletion bugbot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class MyConfig(config.Config):

PATH = "bugbot/scripts/configs/config.json"
PATH = "configs/config.json"

def __init__(self):
super(MyConfig, self).__init__()
Expand Down
2 changes: 1 addition & 1 deletion bugbot/iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def get_phonebook_dump(output_dir=""):
update_bugzilla_emails(new_data)
new_data = list(new_data.values())

with open("./bugbot/scripts/configs/people.json", "w") as Out:
with open("./configs/people.json", "w") as Out:
json.dump(new_data, Out, sort_keys=True, indent=4, separators=(",", ": "))


Expand Down
4 changes: 2 additions & 2 deletions bugbot/people.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class People:

def __init__(self, p=None):
if p is None:
with open("./bugbot/scripts/configs/people.json", "r") as In:
with open("./configs/people.json", "r") as In:
self.data = json.load(In)
else:
self.data = p
Expand Down Expand Up @@ -192,7 +192,7 @@ def get_info_by_nick(self, nick):
def get_rm(self):
"""Get the release managers as defined in configs/rm.json"""
if not self.release_managers:
with open("./bugbot/scripts/configs/rm.json", "r") as In:
with open("./configs/rm.json", "r") as In:
self.release_managers = set(json.load(In))
return self.release_managers

Expand Down
2 changes: 1 addition & 1 deletion bugbot/team_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from bugbot.components import ComponentName, fetch_component_teams
from bugbot.people import People

DEFAULT_PATH = "./bugbot/scripts/configs/team_managers.json"
DEFAULT_PATH = "./configs/team_managers.json"


class TeamManagers:
Expand Down
2 changes: 1 addition & 1 deletion bugbot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
_TRIAGE_OWNERS = None
_DEFAULT_ASSIGNEES = None
_CURRENT_VERSIONS = None
_CONFIG_PATH = "./bugbot/scripts/configs/"
_CONFIG_PATH = "./configs/"


BZ_FIELD_PAT = re.compile(r"^[fovj]([0-9]+)$")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions scripts/cron_common_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ cd "$PATH_SCRIPT"

export PYTHONPATH="$(pwd)"

if test ! -f bugbot/scripts/configs/config.json; then
echo "Cannot run without the config.json file in bugbot/scripts/configs/"
if test ! -f configs/config.json; then
echo "Cannot run without the config.json file in /configs/"
exit -1
fi

if test ! -f bugbot/scripts/configs/people.json; then
echo "Cannot run without the people.json file in bugbot/scripts/configs/"
if test ! -f configs/people.json; then
echo "Cannot run without the people.json file in /configs/"
exit -1
fi

Expand Down

0 comments on commit cacdd65

Please sign in to comment.