Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Commit

Permalink
fix: resolve ValueError in label application (#62)
Browse files Browse the repository at this point in the history
Fixes #60

I had tested the `--dry-run` but not the `--no-dry-run` code path.

To fix, we just update the arguments to the `create_issue` API call.

For good measure, we update both the `create_issue` and
`update_issue` API calls to use only kwargs.
  • Loading branch information
kdmccormick committed May 23, 2023
1 parent 7e3caa8 commit fff5d34
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions migrate/repo_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,11 @@ def fix(self, dry_run=False):
if not dry_run:
try:
self.api.issues.create_label(
self.org_name,
self.repo_name,
label,
self.labels[label],
owner=self.org_name,
repo=self.repo_name,
name=label["name"],
color=label["color"],
description=label["description"],
)
except HTTP4xxClientError as e:
click.echo(e.fp.read().decode("utf-8"))
Expand All @@ -496,8 +497,8 @@ def fix(self, dry_run=False):
if not dry_run:
try:
self.api.issues.update_label(
self.org_name,
self.repo_name,
owner=self.org_name,
repo=self.repo_name,
name=current_label["name"],
color=new_label["color"],
description=new_label["description"],
Expand Down

0 comments on commit fff5d34

Please sign in to comment.