github-overlord 0.2.0__tar.gz → 0.2.1__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,7 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: github-overlord
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Automatically merge Dependabot PRs in public repositories
5
+ Home-page: https://github.com/iloveitaly/github-overlord
5
6
  Keywords: github,dependabot,automation
6
7
  Author: Michael Bianco
7
8
  Author-email: mike@mikebian.co
@@ -51,10 +51,6 @@ def is_eligible_for_merge(pr: PullRequest):
51
51
  if pr.user.login != "dependabot[bot]":
52
52
  return False
53
53
 
54
- # pr_title = pr.title.lower()
55
- # if "patch" not in pr_title and "github actions" not in pr_title:
56
- # return False
57
-
58
54
  last_commit = pr.get_commits().reversed[0]
59
55
  combined_status = last_commit.get_combined_status()
60
56
  status = combined_status.state
@@ -63,6 +59,7 @@ def is_eligible_for_merge(pr: PullRequest):
63
59
  if len(combined_status.statuses) > 0 and status != "success":
64
60
  return False
65
61
 
62
+ # checks are the CI runs
66
63
  all_checks_successful = (
67
64
  last_commit.get_check_runs() | fp.pluck_attr("conclusion") | fp.all("success")
68
65
  )
@@ -117,15 +114,21 @@ def main(token, dry_run, repo):
117
114
  log.info("dependabot pr check complete")
118
115
 
119
116
 
117
+ @click.group()
118
+ def cli():
119
+ pass
120
+
121
+
120
122
  @click.command()
121
123
  @click.option(
122
124
  "--token",
123
125
  help="GitHub token, can also be set via GITHUB_TOKEN",
124
126
  default=os.getenv("GITHUB_TOKEN"),
125
127
  )
128
+ # TODO move this into the parent command
126
129
  @click.option("--dry-run", is_flag=True, help="Run script without merging PRs")
127
130
  @click.option("--repo", help="Only process a single repository")
128
- def cli(token, dry_run, repo):
131
+ def dependabot(token, dry_run, repo):
129
132
  """
130
133
  Automatically merge dependabot PRs in public repos that have passed CI checks
131
134
  """
@@ -141,5 +144,11 @@ def cli(token, dry_run, repo):
141
144
  main(token, dry_run, repo)
142
145
 
143
146
 
147
+ def pr_bumper():
148
+ pass
149
+
150
+
151
+ cli.add_command(dependabot)
152
+
144
153
  if __name__ == "__main__":
145
154
  cli()
@@ -1,10 +1,11 @@
1
1
  [tool.poetry]
2
2
  name = "github-overlord"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "Automatically merge Dependabot PRs in public repositories"
5
5
  authors = ["Michael Bianco <mike@mikebian.co>"]
6
6
  readme = "README.md"
7
7
  keywords = ["github", "dependabot", "automation"]
8
+ homepage = "https://github.com/iloveitaly/github-overlord"
8
9
 
9
10
  [tool.poetry.dependencies]
10
11
  python = "^3.12"