diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index ebf768c..9ea622c 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -1,5 +1,5 @@ -name: 'Test and Release Yakut' -on: push +name: 'Test and release Yakut' +on: [ push, pull_request ] # Ensures that only one workflow is running at a time concurrency: @@ -9,6 +9,8 @@ concurrency: jobs: yakut-test: name: Test Yakut + # https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=edited#pull_request + if: (github.event_name == 'push') || github.event.pull_request.head.repo.fork strategy: fail-fast: false matrix: @@ -71,7 +73,9 @@ jobs: yakut-release: name: Release Yakut runs-on: ubuntu-latest - if: contains(github.event.head_commit.message, '#release') || contains(github.ref, '/main') + if: > + (github.event_name == 'push') && + (contains(github.event.head_commit.message, '#release') || contains(github.ref, '/main')) needs: yakut-test steps: - name: Check out diff --git a/yakut/VERSION b/yakut/VERSION index 9beb74d..288adf5 100644 --- a/yakut/VERSION +++ b/yakut/VERSION @@ -1 +1 @@ -0.13.2 +0.13.3 diff --git a/yakut/cmd/monitor/_model.py b/yakut/cmd/monitor/_model.py index 8add024..eaa28e9 100644 --- a/yakut/cmd/monitor/_model.py +++ b/yakut/cmd/monitor/_model.py @@ -191,8 +191,8 @@ def __repr__(self) -> str: def expand_subjects(m: uavcan.node.port.SubjectIDList_1) -> AbstractSet[int]: if m.sparse_list is not None: return frozenset(int(x.value) for x in m.sparse_list) - if m.mask: - return expand_mask(m.mask) + if m.mask is not None and m.mask.any(): + return expand_mask(m.mask) if m.total: return _COMPLETE_SUBJECT_SET assert False