Skip to content

Commit

Permalink
Adding a new template file to be copied to the role folder when creat…
Browse files Browse the repository at this point in the history
…ing a new role (#384)

* Adding a new file template file logic to be copied over when creating a new talent role

* Linting and formatting
  • Loading branch information
sylviamclaughlin authored Jan 29, 2024
1 parent bc59633 commit 60f1497
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/commands/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,17 @@ def role_view_handler(ack, body, say, logger, client):
logger.info(
f"Created document: SoMC Template in folder: SoMC Template / {somc_template_id}"
)

recruitment_feedback_template_id = google_drive.copy_file_to_folder(
os.getenv("RECRUITMENT_FEEDBACK_TEMPLATE"),
f"Recruitment Feedback - {role_name}",
os.getenv("TEMPLATES_FOLDER"),
folder_id,
)
logger.info(
f"Created document: Recruitment Feedback Template in folder: Recruitment Feedback/ {recruitment_feedback_template_id}"
)

# Create channel
response = client.conversations_create(name=private_channel_name, is_private=True)

Expand Down
6 changes: 6 additions & 0 deletions app/tests/commands/test_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ def test_copy_files_to_internal_talent_folder(
os.getenv("TEMPLATES_FOLDER"),
"folder_id",
),
call(
os.getenv("RECRUITMENT_FEEDBACK_TEMPLATE"),
"Recruitment Feedback - foo",
os.getenv("TEMPLATES_FOLDER"),
"folder_id",
),
]
)

Expand Down

0 comments on commit 60f1497

Please sign in to comment.