Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new document to the templates for the command role #655

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app/modules/role/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,18 @@ def role_view_handler(ack, body, say, logger, client):
f"Created document: Recruitment Feedback Template in folder: Recruitment Feedback/ {recruitment_feedback_template_id}"
)

panelist_guidebook_template_id = google_drive.copy_file_to_folder(
os.getenv("PANELIST_GUIDEBOOK_TEMPLATE"),
f"Panelist Guidebook - Interview Best Practices - {role_name}",
os.getenv("TEMPLATES_FOLDER"),
folder_id,
scopes=ROLE_SCOPES,
delegated_user_email=BOT_EMAIL,
)
logger.info(
f"Created document: Panelist Guidebook Template in folder: Panelist Guidebook/ {panelist_guidebook_template_id}"
)

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

Expand Down
8 changes: 8 additions & 0 deletions app/tests/modules/role/test_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@ def test_copy_files_to_internal_talent_folder(
scopes=["https://www.googleapis.com/auth/drive"],
delegated_user_email="bot_email",
),
call(
os.getenv("PANELIST_GUIDEBOOK_TEMPLATE"),
"Panelist Guidebook - Interview Best Practices - foo",
os.getenv("TEMPLATES_FOLDER"),
"folder_id",
scopes=["https://www.googleapis.com/auth/drive"],
delegated_user_email="bot_email",
),
]
)

Expand Down
Loading