github-overlord 0.6.3__tar.gz → 0.6.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: github-overlord
3
- Version: 0.6.3
3
+ Version: 0.6.4
4
4
  Summary: Automatically merge Dependabot PRs in public repositories
5
5
  Home-page: https://github.com/iloveitaly/github-overlord
6
6
  Keywords: github,dependabot,automation
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.12
13
13
  Requires-Dist: apscheduler (>=3.10.4,<4.0.0)
14
14
  Requires-Dist: click (>=8.1.7,<9.0.0)
15
15
  Requires-Dist: funcy-pipe (>=0.11.0,<0.12.0)
16
- Requires-Dist: openai (>=1.35.1,<2.0.0)
16
+ Requires-Dist: openai (>=1.35.3,<2.0.0)
17
17
  Requires-Dist: pygithub (>=2.3.0,<3.0.0)
18
18
  Requires-Dist: python-decouple-typed (>=3.11.0,<4.0.0)
19
19
  Requires-Dist: structlog (>=24.2.0,<25.0.0)
@@ -185,7 +185,9 @@ def dependabot(token, dry_run, repo):
185
185
  Automatically merge dependabot PRs in public repos that have passed CI checks
186
186
  """
187
187
 
188
- repo = extract_repo_reference_from_github_url(repo)
188
+ if repo:
189
+ repo = extract_repo_reference_from_github_url(repo)
190
+
189
191
  main(token, dry_run, repo)
190
192
 
191
193
 
@@ -206,7 +208,7 @@ def keep_alive_prs(token, dry_run, repo):
206
208
 
207
209
  github.get_repo(repo).get_pulls(state="open") | fp.filter(
208
210
  lambda pr: pr.user.login == login
209
- ) | fp.map(check_for_stale_comments) | fp.to_list()
211
+ ) | fp.map(fp.partial(check_for_stale_comments, dry_run)) | fp.to_list()
210
212
 
211
213
 
212
214
  def notifications(token, dry_run):
@@ -7,7 +7,7 @@ from openai import OpenAI
7
7
  from github_overlord.utils import log
8
8
 
9
9
 
10
- def check_for_stale_comments(pr: PullRequest):
10
+ def check_for_stale_comments(dry_run: bool, pr: PullRequest):
11
11
  """
12
12
  Look at PRs which you have written:
13
13
 
@@ -42,7 +42,9 @@ def check_for_stale_comments(pr: PullRequest):
42
42
  log.info(
43
43
  "comment indicates stale state, commenting", url=pr.html_url, comment=comment
44
44
  )
45
- # pr.create_issue_comment(comment)
45
+
46
+ if not dry_run:
47
+ pr.create_issue_comment(comment)
46
48
 
47
49
 
48
50
  def is_stale_comment(comment: IssueComment):
@@ -56,8 +58,8 @@ A GitHub pull request comment will be included with the author name. Determine i
56
58
  request will be closed, respond with a JSON object like:
57
59
 
58
60
  {
59
- "stale": "yes",
60
- "comment": "Friendly reminder on this pull request! Let me know what else may need to be done here."
61
+ "stale": "yes",
62
+ "comment": "Friendly reminder on this pull request! Let me know what else may need to be done here."
61
63
  }
62
64
 
63
65
  Adjust the comment wording slightly.
@@ -65,8 +67,13 @@ Adjust the comment wording slightly.
65
67
  If the comment does not indicate that the pull request will be closed, respond with:
66
68
 
67
69
  {
68
- "stale": "no",
70
+ "stale": "no",
69
71
  }
72
+
73
+ Do not:
74
+
75
+ * Ask for an update. This sound demanding.
76
+ * Mention that the pull request will be closed.
70
77
  """
71
78
  comment_markdown = """
72
79
  Author: {comment.user.login}
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "github-overlord"
3
- version = "0.6.3"
3
+ version = "0.6.4"
4
4
  description = "Automatically merge Dependabot PRs in public repositories"
5
5
  authors = ["Michael Bianco <mike@mikebian.co>"]
6
6
  readme = "README.md"
@@ -15,7 +15,7 @@ python-decouple-typed = "^3.11.0"
15
15
  funcy-pipe = "^0.11.0"
16
16
  structlog = "^24.2.0"
17
17
  apscheduler = "^3.10.4"
18
- openai = "^1.35.1"
18
+ openai = "^1.35.3"
19
19
 
20
20
  [tool.poetry.scripts]
21
21
  github-overlord = "github_overlord:cli"