Skip to content

Commit a1d0bdd

Browse files
committed
testing drift new version
1 parent e32d84d commit a1d0bdd

2 files changed

Lines changed: 14 additions & 15 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.12"
1+
__version__ = "0.2.13"
22

devolv/drift/issues.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
from github import Github
22
import time
33

4-
def create_approval_issue(repo_full_name, token, policy_name):
5-
g = Github(token)
6-
repo = g.get_repo(repo_full_name)
7-
body = (
8-
f"Drift detected for policy `{policy_name}`.\n\n"
9-
"Please comment:\n"
10-
"- `local->aws` to sync local changes to AWS\n"
11-
"- `aws->local` to sync AWS changes to local file\n"
12-
"- `aws<->local` to sync both ways (first AWS -> local, then local -> AWS)\n"
13-
"- `skip` to do nothing"
14-
)
4+
def create_approval_issue(repo_full_name, token, policy_name,assignees=None):
5+
gh = Github(token)
6+
repo = gh.get_repo(repo_full_name)
7+
8+
title = f"Approval needed for IAM policy: {policy_name}"
9+
body = f"Please review and approve the sync for `{policy_name}`."
10+
1511
issue = repo.create_issue(
16-
title=f"Devolv Drift Sync Approval Needed: {policy_name}",
17-
body=body
12+
title=title,
13+
body=body,
14+
assignees=assignees or []
1815
)
19-
return issue.number
16+
17+
print(f"✅ Created issue #{issue.number} in {repo_full_name}: {issue.html_url}")
18+
return issue.number, issue.html_url
2019

2120
def wait_for_sync_choice(repo_full_name, issue_number, token):
2221
g = Github(token)

0 commit comments

Comments
 (0)