From 506958a2f0c70be568b9757bdd2533cde2f9a3f4 Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Tue, 25 Jul 2023 13:50:43 +0300 Subject: [PATCH] new iteration(starting 0.0.26) (#45) Added branch protection rules --------- Signed-off-by: Alexander Piskun --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .../workflows/analysis-coverage-unrelated.yml | 27 +++++++++++++++++++ .github/workflows/analysis-coverage.yml | 17 +++++++++++- .github/workflows/docs-check.yml | 3 +++ .github/workflows/docs.yml | 3 +++ CHANGELOG.md | 8 ++++++ nc_py_api/_version.py | 2 +- nc_py_api/files_sharing.py | 23 +++++++--------- 8 files changed, 69 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/analysis-coverage-unrelated.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index fbad7c7c..45d38b9a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -53,7 +53,7 @@ body: description: | Paste or describe the configuration setting, including software versions, to help diagnose the problem more quickly. placeholder: > - Example: nc_py_apy = 0.15.0, nextcloud = 28.0.4, etc. + Example: nc_py_api = 0.15.0, nextcloud = 28.0.4, etc. validations: required: true - type: markdown diff --git a/.github/workflows/analysis-coverage-unrelated.yml b/.github/workflows/analysis-coverage-unrelated.yml new file mode 100644 index 00000000..c398163a --- /dev/null +++ b/.github/workflows/analysis-coverage-unrelated.yml @@ -0,0 +1,27 @@ +name: Analysis & Coverage + +on: + pull_request: + paths-ignore: + - '.github/workflows/analysis-coverage.yml' + - 'nc_py_api/*.*' + - 'tests/**' + - 'setup.*' + - 'pyproject.toml' + - '.pre-commit-config.yaml' + +permissions: + contents: read + +concurrency: + group: ana_cov-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + tests-success: + permissions: + contents: none + runs-on: ubuntu-22.04 + name: Tests-OK + steps: + - run: echo "No Tests required" diff --git a/.github/workflows/analysis-coverage.yml b/.github/workflows/analysis-coverage.yml index 96249d52..bbf5996e 100644 --- a/.github/workflows/analysis-coverage.yml +++ b/.github/workflows/analysis-coverage.yml @@ -18,7 +18,13 @@ on: - 'setup.*' - 'pyproject.toml' - '.pre-commit-config.yaml' - workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ana_cov-${{ github.head_ref || github.run_id }} + cancel-in-progress: true env: NEXTCLOUD_URL: "http://localhost:8080" @@ -626,3 +632,12 @@ jobs: name: nc_log_sqlite_${{ matrix.nextcloud }} path: data/nextcloud.log if-no-files-found: warn + + tests-success: + permissions: + contents: none + runs-on: ubuntu-22.04 + needs: [tests-maria, tests-pgsql, tests-oci, tests-latest, tests-sqlite] + name: Tests-OK + steps: + - run: echo "Tests passed successfully" diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml index 74368e8d..998c9f22 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -2,6 +2,9 @@ name: Docs check on: pull_request: +permissions: + contents: read + jobs: build_docs: runs-on: ubuntu-latest diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4f94240a..d5d1423f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,6 +3,9 @@ on: push: branches: [ main ] +permissions: + contents: read + jobs: build_push_docs: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index a6bedfed..f414621b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. +## [0.0.26 - 2023-0x-xx] + +### Added + +- First Examples. +- More documentation. +- First `Notifications` APIs. + ## [0.0.25 - 2023-07-25] ### Added diff --git a/nc_py_api/_version.py b/nc_py_api/_version.py index eccc634c..1262f617 100644 --- a/nc_py_api/_version.py +++ b/nc_py_api/_version.py @@ -1,3 +1,3 @@ """ Version of nc_py_api""" -__version__ = "0.0.25" +__version__ = "0.0.26-dev" diff --git a/nc_py_api/files_sharing.py b/nc_py_api/files_sharing.py index 46b1c8c8..5f692aae 100644 --- a/nc_py_api/files_sharing.py +++ b/nc_py_api/files_sharing.py @@ -96,21 +96,18 @@ def create( :param permissions: combination of the :py:class:`~nc_py_api.SharePermissions` object values. :param share_type: :py:class:`~nc_py_api.ShareType` value. :param share_with: the recipient of the shared object. - :param kwargs: *Additionally supported arguments* + :param kwargs: See below. Additionally supported arguments: - ``public`` - boolean indicating should share be available for non-registered users. - default = ``False`` - ``password`` - string with password to protect share. - default = ``""`` - ``send_password_by_talk`` - boolean indicating should password be automatically delivered using Talk. - default = ``False`` - ``expire_date`` - py:class:`datetime` time when share should expire. `hours, minutes, seconds` are ignored. - default = None - ``note`` - string with note, if any. - default = ``""`` - ``label`` - string with label, if any. - default = ``""`` + + * ``public`` - boolean indicating should share be available for non-registered users. default = ``False`` + * ``password`` - string with password to protect share. default = ``""`` + * ``send_password_by_talk`` - boolean indicating should password be automatically delivered using Talk. + default = ``False`` + * ``expire_date`` - py:class:`~datetime` time when share should expire. + `hours, minutes, seconds` are ignored. default = ``None`` + * ``note`` - string with note, if any. default = ``""`` + * ``label`` - string with label, if any. default = ``""`` """ require_capabilities("files_sharing", self._session.capabilities)