openmobilehub / android-omh-storage

https://www.openmobilehub.org
Apache License 2.0
4 stars 1 forks source link

Add API to get storage usage and quota #86

Closed TranceLove closed 1 month ago

TranceLove commented 1 month ago

Summary

Adds support to get the total file size at specified storage provider.

Checklist:

TranceLove commented 1 month ago

PR is ready for review :pray: do let me know if any documentation needs updating.

TranceLove commented 1 month ago

The failure at assembling modules for storage-sample app is caused by missing credentials required at BuildConfig, which the values are not supposed to exist at the repo. Anything I can do to work around this?

dzuluaga commented 1 month ago

Hey @adamTrz Any clue what's missing here? It look like the GH Action isn't picking up the local.properties file.

CC - @Nataliagros

> Task :apps:storage-sample:checkDebugDuplicateClasses
/home/runner/work/android-omh-storage/android-omh-storage/apps/storage-sample/build/generated/source/buildConfig/debug/com/openmobilehub/android/storage/sample/BuildConfig.java:12: error: illegal start of expression

> Task :apps:storage-sample:kaptDebugKotlin FAILED
  public static final String DROPBOX_CLIENT_ID = ;
                                                 ^
/home/runner/work/android-omh-storage/android-omh-storage/apps/storage-sample/build/generated/source/buildConfig/debug/com/openmobilehub/android/storage/sample/BuildConfig.java:13: error: illegal start of expression
  public static final String GOOGLE_CLIENT_ID = ;
                                                ^
/home/runner/work/android-omh-storage/android-omh-storage/apps/storage-sample/build/generated/source/buildConfig/debug/com/openmobilehub/android/storage/sample/BuildConfig.java:14: error: illegal start of expression
  public static final String MICROSOFT_CLIENT_ID = ;
                                                   ^
/home/runner/work/android-omh-storage/android-omh-storage/apps/storage-sample/build/generated/source/buildConfig/debug/com/openmobilehub/android/storage/sample/BuildConfig.java:15: error: illegal start of expression
  public static final String MICROSOFT_SIGNATURE_HASH = ;
adamTrz commented 1 month ago

Hey @adamTrz Any clue what's missing here? It look like the GH Action isn't picking up the local.properties file.

That's strange - all those secrets should be populated during Setup Secrets GH Action Step

@TranceLove - mind resolving merge conflicts and trying to push changes again so we can trigger a new GH Actions run?

adamTrz commented 1 month ago

Hey, @TranceLove - thanks for the PR and adjustments. I've noticed that build pipeline is failing and I think I know what's the issue here - you have done a Pull Requests from a fork and doing so you don't have access to our Github Actions Secrets. So that's why android build is failing. Could you please make a new pull request with proposed changes but make it directly from a branch with our repos origin? :)

TranceLove commented 1 month ago

Yes sure. Along with #88 :pray:

TranceLove commented 1 month ago

@adamTrz seems I don't have write permission to push my branch here. May you help?

adamTrz commented 1 month ago

@TranceLove I've granted you write access đź‘Ť

@dzuluaga could you please check repo's / omh GH organization rules so everyone would be able to make contributions?

dzuluaga commented 1 month ago

@adamTrz granting write access to the repo isn’t recommended as it could expose sensitive information like secrets to external contributors. Instead, we should use manual approval with GitHub Environments.

This allows PRs to be reviewed, and after approval, workflows can safely access secrets (e.g., for APK generation). We can set up an environment (e.g., testing) that requires approval from a maintainer before running. More details can be found here.

Would you be able to set this up for the repos? Thanks!

CC - @Nataliagros