Skip to content

Commit

Permalink
Tiny coding style tweaks
Browse files Browse the repository at this point in the history
Remove redundant type parameter
Just keep incomplete checks' names
  • Loading branch information
HebaruSan committed May 19, 2024
1 parent be2d0cb commit 1df93bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Core/Registry/CompatibilitySorter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public ICollection<CkanModule> LatestIncompatible
/// </returns>
private IEnumerable<string> RelationshipIdentifiers(RelationshipDescriptor rel)
=> rel is ModuleRelationshipDescriptor modRel
? Enumerable.Repeat<string>(modRel.name, 1)
? Enumerable.Repeat(modRel.name, 1)
: rel is AnyOfRelationshipDescriptor anyRel
? anyRel.any_of.SelectMany(RelationshipIdentifiers)
: Enumerable.Empty<string>();
Expand Down
7 changes: 4 additions & 3 deletions bin/ckan_merge_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,13 @@ def merge_into(self, repo: CkanRepo, self_review: bool) -> bool:
print(f'PR #{self.pull_request.number} commit {self.pull_request.head.sha} not found!')
return False
pr_commits = self.pull_request.get_commits()
incomplete_checks = [run
for run in pr_commits[pr_commits.totalCount - 1].get_check_runs()
incomplete_checks = [run.name
for run
in pr_commits[pr_commits.totalCount - 1].get_check_runs()
if run.status != 'completed'
or run.conclusion not in ('success', 'skipped')]
if incomplete_checks:
print('Incomplete checks:', ', '.join(ch.name for ch in incomplete_checks))
print('Incomplete checks:', ', '.join(incomplete_checks))
return False
# Valid; do it!
# repo.index.merge_tree doesn't auto resolve conflicts
Expand Down

0 comments on commit 1df93bd

Please sign in to comment.