Skip to content
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
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/update-member.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ body:
id: auto_update_publications
attributes:
label: "Auto Update Publications"
description: Do you want your publications to be auto-updated?
description: Do you want your publications to be auto-updated? Leave blank to keep the current setting.
multiple: false
options:
- "False"
- "True"
validations:
required: True
required: false

- type: dropdown
id: current_role-type
Expand Down
10 changes: 6 additions & 4 deletions src/python/add_update_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ def process_role_data(parsed: Dict, prefix: str = "") -> Optional[Dict]:

def format_parsed_content(parsed: Dict) -> Dict:
"""Format the parsed content into the new structure."""
formatted = {
"name": parsed["name"],
"auto_update_publications": parsed.get("auto_update_publications", "False") == "True"
}
formatted = {"name": parsed["name"]}

# Left blank on an update, the existing setting is kept; new members default to False
if is_filled(parsed.get("auto_update_publications")):
formatted["auto_update_publications"] = parsed["auto_update_publications"] == "True"

# Process current role
current_role = process_role_data(parsed, "current_role_")
Expand Down Expand Up @@ -173,6 +174,7 @@ def main(parsed: Dict, action: str, site_data_dir: str = "_data/", image_dir: st
name_to_username = {authors[username]["name"]: username for username in authors}

if action == "Add member" and profile["name"] not in name_to_username:
profile.setdefault("auto_update_publications", False)
username = profile["name"]
if username in authors:
n = 2
Expand Down
Loading