forked from forge/forge
Update scripts/update-forge-fas-emails.py
This commit is contained in:
parent
dd4d6eab17
commit
ce6bc9fa7e
1 changed files with 0 additions and 33 deletions
|
|
@ -102,40 +102,7 @@ import requests
|
|||
import sys
|
||||
from fasjson_client import Client
|
||||
|
||||
<<<<<<< HEAD
|
||||
# Configuration
|
||||
# FORGE_URL = "https://forge.stg.fedoraproject.org"
|
||||
# FORGE_TOKEN = "token" # Replace with actual token
|
||||
# FASJSON_URL = "https://fasjson.stg.fedoraproject.org"
|
||||
|
||||
FORGE_URL = "https://forge.fedoraproject.org"
|
||||
FORGE_TOKEN = "token" # Replace with actual token
|
||||
FASJSON_URL = "https://fasjson.fedoraproject.org"
|
||||
|
||||
OUTPUT_FILE = "out.txt"
|
||||
DRY_RUN = True # Set to False to actually make changes
|
||||
|
||||
class Tee:
|
||||
"""Write to both stdout and file"""
|
||||
def __init__(self, filename):
|
||||
self.file = open(filename, 'w')
|
||||
self.stdout = sys.stdout
|
||||
|
||||
def write(self, data):
|
||||
self.file.write(data)
|
||||
self.stdout.write(data)
|
||||
|
||||
def flush(self):
|
||||
self.file.flush()
|
||||
self.stdout.flush()
|
||||
|
||||
def close(self):
|
||||
self.file.close()
|
||||
|
||||
def update_forge_email(forge_session, username, new_email, dry_run=False):
|
||||
=======
|
||||
def update_forge_email(forge_session, username, new_email, forge_url, dry_run=False):
|
||||
>>>>>>> bc7d53f (Improve update-forge-fas-emails.py script with CLI and better handling)
|
||||
"""Update a user's email in Forge via admin API"""
|
||||
if dry_run:
|
||||
return True, "Dry run - no changes made"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue