-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move contact email to action variables (#202)
- Loading branch information
1 parent
c10d5d1
commit 80ee013
Showing
2 changed files
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ def __init__(self, **kwargs): | |
Initialize the obs instance | ||
""" | ||
self.username = kwargs.get("username", "") | ||
self.contact = kwargs.get("contact", "") | ||
self.osc = Osc( | ||
url="https://api.opensuse.org", | ||
username=self.username, | ||
|
@@ -79,7 +80,7 @@ def modify_changes_file(self) -> None: | |
lines = [f" {line}" for line in self.release_body.strip().split("\r\n") if line] | ||
content = f"- Release {self.release_name}\n" + "\n".join(lines) | ||
entry = Entry( | ||
packager=f"{self.username} <[email protected]>", | ||
packager=f"{self.username} <{self.contact}>", | ||
content=content, | ||
timestamp=datetime.now(tz=_UTC()) | ||
) | ||
|
@@ -128,6 +129,9 @@ def __call__(self) -> None: | |
parser = argparse.ArgumentParser(description='Auto release package to OBS.') | ||
parser.add_argument('--username', required=True, help='Username for login') | ||
parser.add_argument('--password', required=True, help='Password for login') | ||
parser.add_argument('--contact', required=True, help='Email address of user') | ||
args = parser.parse_args() | ||
obs = Obs(username=args.username, password=args.password) | ||
obs = Obs(username=args.username, | ||
password=args.password, | ||
contact=args.contact) | ||
obs() |