Skip to content

Commit

Permalink
Merge pull request #126 from sommersoft/patch_action_build_pylint
Browse files Browse the repository at this point in the history
Add Patchfile For Actions; Ignore Archived Repos; Adjust Patch Result Counting
  • Loading branch information
siddacious authored Jan 12, 2020
2 parents ebf9b9f + cbaeda5 commit 42bfc73
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 208 deletions.
7 changes: 5 additions & 2 deletions adabot/circuitpython_library_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ def check_patches(repo, patches, flags, use_apply, dry_run):
run_apply = True
except sh.ErrorReturnCode_1 as Err:
run_apply = False
if b"error" not in Err.stderr:
skipped += 1
if (b"error" not in Err.stderr or
b"patch does not apply" in Err.stderr):
skipped += 1
else:
failed += 1
error_str = str(Err.stderr, encoding="utf-8").replace("\n", " ")
Expand All @@ -195,6 +196,8 @@ def check_patches(repo, patches, flags, use_apply, dry_run):
applied += 1
else:
failed += 1
elif run_apply and dry_run:
applied += 1

return [applied, skipped, failed]

Expand Down
2 changes: 1 addition & 1 deletion adabot/lib/common_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def list_repos(*, include_repos=None):
"""
repos = []
result = github.get("/search/repositories",
params={"q":"Adafruit_CircuitPython user:adafruit",
params={"q":"Adafruit_CircuitPython user:adafruit archived:false",
"per_page": 100,
"sort": "updated",
"order": "asc"}
Expand Down
25 changes: 25 additions & 0 deletions patches/0001-update-pylint-examples-directive.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From e1f4301b25e7e6f120b85c316cfbaf838fc1282e Mon Sep 17 00:00:00 2001
From: sommersoft <sommersoft@gmail.com>
Date: Wed, 8 Jan 2020 21:09:22 -0600
Subject: [PATCH] update pylint examples directive

---
.github/workflows/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 66ce4db..11ce574 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -42,7 +42,7 @@ jobs:
- name: PyLint
run: |
pylint $( find . -path './adafruit*.py' )
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/*.py)
+ ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" ))
- name: Build assets
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
- name: Build docs
--
2.17.1

180 changes: 0 additions & 180 deletions patches/0001-updated-CoC.patch

This file was deleted.

25 changes: 0 additions & 25 deletions patches/ignore-the-board-module-imports-in-.pylintrc.patch

This file was deleted.

0 comments on commit 42bfc73

Please sign in to comment.