Skip to content

Commit 1ff8b64

Browse files
committed
testing our new version
1 parent e48737c commit 1ff8b64

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

devolv/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "0.2.18"
1+
__version__ = "0.2.19"
22

devolv/drift/cli.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,24 @@ def _update_local_and_create_pr(doc, policy_file, repo_full_name, policy_name, i
109109
with open(policy_file, "w") as f:
110110
f.write(new_content)
111111

112-
branch = (
112+
branch_base = (
113113
f"{description.replace(' ', '-').replace('+', 'plus').replace('/', '-')}-policy-{policy_name}"
114114
.strip("-")
115115
.lower()
116116
)
117-
push_branch(branch)
117+
branch_name = push_branch(branch_base)
118118

119119
pr_title = f"Update {policy_file} {description}".strip()
120120
pr_body = f"This PR updates `{policy_file}` {description}.\n\nLinked to issue #{issue_num}.".strip()
121-
pr_num, pr_url = create_github_pr(repo_full_name, branch, pr_title, pr_body, issue_num=issue_num)
121+
pr_num, pr_url = create_github_pr(repo_full_name, branch_name, pr_title, pr_body, issue_num=issue_num)
122122

123123
typer.echo(f"✅ Created PR #{pr_num}: {pr_url}")
124-
typer.echo(f"💬 Commented on and closed issue #{issue_num}")
125124

126-
# Auto-close issue
125+
# Close issue *immediately after PR link is posted*
127126
gh = Github(token)
128127
repo = gh.get_repo(repo_full_name)
129128
issue = repo.get_issue(number=issue_num)
130129
issue.create_comment(f"✅ PR created and linked: {pr_url}. Closing issue.")
131130
issue.edit(state="closed")
131+
typer.echo(f"💬 Commented on and closed issue #{issue_num}")
132+

devolv/drift/github_approvals.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ def create_github_pr(repo: str, head_branch: str, title: str, body: str, base: s
4848
if issue_num:
4949
issue = repo_obj.get_issue(number=issue_num)
5050
issue.create_comment(f"A PR has been created for this sync: {pr.html_url}")
51-
issue.edit(state="closed")
52-
print(f"💬 Linked and closed issue #{issue_num}")
5351

5452
return pr.number, pr.html_url
5553

0 commit comments

Comments
 (0)