From f2520149b1bd97950f9c41be66c1bae448069470 Mon Sep 17 00:00:00 2001 From: Manav Date: Thu, 16 Feb 2023 22:19:18 +0530 Subject: [PATCH 1/2] Update to cla-assistant.io for CLA shared across ente Replace the manual per-repository integration with the standard cla-assistant.io setup for integrating a single CLA across all ente repositories. Updated CLA: https://gist.github.com/enteio/f3b9abc4e047425da3e1538cde903b4d --- .github/workflows/cla.yaml | 38 --------------- CLA.md | 98 -------------------------------------- 2 files changed, 136 deletions(-) delete mode 100644 .github/workflows/cla.yaml delete mode 100644 CLA.md diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml deleted file mode 100644 index 25340ec9f..000000000 --- a/.github/workflows/cla.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: "CLA Assistant" -on: - issue_comment: - types: [created] - pull_request_target: - types: [opened, closed, synchronize] - -jobs: - CLAAssistant: - # This job only runs for pull request comments - if: ${{ github.event.issue.pull_request }} - runs-on: ubuntu-latest - steps: - - name: "CLA Assistant" - if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' - # Beta Release - uses: contributor-assistant/github-action@v2.2.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # the below token should have repo scope and must be manually added by you in the repository's secret - PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - with: - path-to-signatures: "signatures/version1/cla.json" - path-to-document: "https://github.com/ente-io/cla/blob/main/CLA.md" # e.g. a CLA or a DCO document - # branch should not be protected - branch: "main" - allowlist: enteio - - # the followings are the optional inputs - If the optional inputs are not given, then default values will be taken - #remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository) - remote-repository-name: cla - #create-file-commit-message: 'For example: Creating file for storing CLA Signatures' - #signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo' - #custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign' - #custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA' - #custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.' - #lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true) - #use-dco-flag: true - If you are using DCO instead of CLA diff --git a/CLA.md b/CLA.md deleted file mode 100644 index 71c216537..000000000 --- a/CLA.md +++ /dev/null @@ -1,98 +0,0 @@ -## Contributor License Agreement - -Thank you for your contribution to ente projects. - -This contributor license agreement documents the rights granted by contributors -to Ente Technologies, Inc ("ente"). This license is for your protection as a -Contributor as well as the protection of ente, its users, and its licensees; you -may still license your own Contributions under other terms. - -In exchange for the ability to participate in the ente community and for other -good consideration, the receipt of which is hereby acknowledged, you accept and -agree to the following terms and conditions for Your present and future -Contributions submitted to ente. Except for the license granted herein to ente -and recipients of software distributed by ente, You reserve all right, title, -and interest in and to Your Contributions. - -1. Definitions. - - "You" (or "Your") shall mean the copyright owner or legal entity authorized - by the copyright owner that is making this Agreement with ente. For legal - entities, the entity making a Contribution and all other entities that - control, are controlled by, or are under common control with that entity are - considered to be a single Contributor. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the direction or - management of such entity, whether by contract or otherwise, or (ii) - ownership of fifty percent (50%) or more of the outstanding shares, or (iii) - beneficial ownership of such entity. - - "Contribution" shall mean any original work of authorship or invention, - including any modifications or additions to an existing work, that is - intentionally submitted by You to ente for inclusion in, or documentation of, - any of the products owned or managed by ente (the "Work"). For the purposes - of this definition, "submitted" means any form of electronic, verbal, or - written communication sent to ente or its representatives, including but not - limited to communication on electronic mailing lists, source code control - systems, and issue tracking systems that are managed by, or on behalf of, - ente for the purpose of discussing and improving the Work, but excluding - communication that is conspicuously marked or otherwise designated in writing - by You as "Not a Contribution." - -2. Grant of Copyright License. Subject to the terms and conditions of this - Agreement, You hereby grant to ente and to recipients of software distributed - by ente a perpetual, worldwide, non-exclusive, no-charge, royalty-free, - irrevocable copyright license to reproduce, prepare derivative works of, - publicly display, publicly perform, and distribute Your Contributions and - such derivative works. - -3. Grant of Patent License. Subject to the terms and conditions of this - Agreement, You hereby grant to ente and to recipients of software distributed - by ente a perpetual, worldwide, non-exclusive, no-charge, royalty-free, - irrevocable (except as stated in this section) patent license to make, have - made, use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable by You that - are necessarily infringed by Your Contribution(s) alone or by combination of - Your Contribution(s) with the Work to which such Contribution(s) was - submitted. If any entity institutes patent litigation against You or any - other entity (including a cross-claim or counterclaim in a lawsuit) alleging - that your Contribution, or the Work to which you have contributed, - constitutes direct or contributory patent infringement, then any patent - licenses granted to that entity under this Agreement for that Contribution or - Work shall terminate as of the date such litigation is filed. - -4. You represent that you are legally entitled to grant the above license. If - your employer(s) has rights to intellectual property that you create that - includes your Contributions, you represent that you have received permission - to make Contributions on behalf of that employer, that your employer has - waived such rights for your contributions to ente, or that your employer has - executed with ente a separate contributor license agreement substantially - similar to this Agreement. If You are a current employee or contractor of - ente, then the terms of your existing Employment Agreement or Consulting - Services Agreement shall supersede this CLA, and remain in full effect. - -5. You represent that each of Your Contributions is Your original creation (see - section 7 for submissions on behalf of others). You represent that Your - Contribution submissions include complete details of any third-party license - or other restriction (including, but not limited to, related patents and - trademarks) of which you are personally aware and which are associated with - any part of Your Contributions. - -6. You are not expected to provide support for Your Contributions, except to the - extent You desire to provide support. You may provide support for free, for - a fee, or not at all. Unless required by applicable law or agreed to in - writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, - without limitation, any warranties or conditions of title, non-infringement, - merchantability, or fitness for a particular purpose. - -7. Should You wish to submit work that is not Your original creation, You may - submit it to ente separately from any Contribution, identifying the complete - details of its source and of any license or other restriction (including, but - not limited to, related patents, trademarks, and license agreements) of which - you are personally aware, and conspicuously marking the work as "Not a - Contribution". Third-party materials licensed pursuant to: [license name(s) - here]" (substituting the bracketed text with the appropriate license - name(s)). - -8. You agree to notify ente of any facts or circumstances of which you become - aware that would make these representations inaccurate in any respect. From caab7cc2605b25577a4408d06aa13b8a69f2efd7 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Sat, 18 Feb 2023 16:53:02 +0530 Subject: [PATCH 2/2] Revert "Enable object detection for everyone" This reverts commit fbd9c1f5f44faff42ce0ea9a126716067b7eecdd. --- lib/main.dart | 4 +++- lib/ui/viewer/file/file_info_widget.dart | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 51fb7b9d6..e998a81d8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -161,7 +161,9 @@ Future _init(bool isBackground, {String via = ''}) async { }); } FeatureFlagService.instance.init(); - await ObjectDetectionService.instance.init(); + if (FeatureFlagService.instance.isInternalUserOrDebugBuild()) { + await ObjectDetectionService.instance.init(); + } _logger.info("Initialization done"); } diff --git a/lib/ui/viewer/file/file_info_widget.dart b/lib/ui/viewer/file/file_info_widget.dart index 13772144f..e40c1c165 100644 --- a/lib/ui/viewer/file/file_info_widget.dart +++ b/lib/ui/viewer/file/file_info_widget.dart @@ -10,6 +10,7 @@ import "package:photos/ente_theme_data.dart"; import "package:photos/models/file.dart"; import "package:photos/models/file_type.dart"; import 'package:photos/services/collections_service.dart'; +import "package:photos/services/feature_flag_service.dart"; import 'package:photos/theme/ente_theme.dart'; import 'package:photos/ui/components/divider_widget.dart'; import 'package:photos/ui/components/icon_button_widget.dart'; @@ -236,14 +237,16 @@ class _FileInfoWidgetState extends State { : DeviceFoldersListOfFileWidget(allDeviceFoldersOfFile), ), ), - SizedBox( - height: 62, - child: ListTile( - horizontalTitleGap: 0, - leading: const Icon(Icons.image_search), - title: ObjectTagsWidget(file), - ), - ), + FeatureFlagService.instance.isInternalUserOrDebugBuild() + ? SizedBox( + height: 62, + child: ListTile( + horizontalTitleGap: 0, + leading: const Icon(Icons.image_search), + title: ObjectTagsWidget(file), + ), + ) + : null, (file.uploadedFileID != null && file.updationTime != null) ? ListTile( horizontalTitleGap: 2,