Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

adjust github pre-commit action #510

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
## What does this implement/fix? Explain your changes.

## Does this close any currently open issues?
## Does this close any currently open issues?
If it fixes a bug or resolves a feature request, be sure to link to that issue.

## Pull request type
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->
_Put an `x` in the boxes that apply_
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):
- [ ] Other (please describe):

## Where has this been tested?
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ios-app-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
plutil -insert 'provisioningProfiles' -xml "<dict> <key>$APP_ID</key> <string>$UUID_PROVISION</string> </dict>" -- Support/OneKey-Info.plist
plutil -insert 'teamID' -string "$DEVELOPMENT_TEAM" -- Support/OneKey-Info.plist
plutil -insert 'signingStyle' -string "mannual" -- Support/OneKey-Info.plist
working-directory: ios
working-directory: ios
- name: Build app
id: xcodebuild_export
run: |
Expand Down Expand Up @@ -140,14 +140,13 @@ jobs:
| tee xcodebuild.log \
| xcpretty -r json-compilation-database --output compile_commands.json
oclint-json-compilation-database -e Pods -e CustomCode/Modules/Third/ -- -report-type html -o oclintReport.html
working-directory: ios/iOS
working-directory: ios/iOS
- name: Archive lint artifacts
uses: actions/upload-artifact@v2
if: success()
with:
name: OneKey ios app lint report
path: |
ios/iOS/xcodebuild.log
ios/iOS/oclintReport.html
ios/iOS/oclintReport.html
ios/iOS/clang-analyze/StaticAnalyzer/

14 changes: 3 additions & 11 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- id: file_changes
uses: jitterbit/get-changed-files@v1
- uses: pre-commit/[email protected]
with:
extra_args: --files ${{ steps.file_changes.outputs.all }}
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ repos:
rev: 1.7.0
hooks:
- id: bandit
files: ^electrum_gui
args: [--skip, "B107,B101,B106",]
files: ^electrum_gui/common
args: [--skip, "B107,B101,B106"]
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
- if [ $TRAVIS_PULL_REQUEST == false ]; then
openssl aes-256-cbc -K $encrypted_0712df971a99_key -iv $encrypted_0712df971a99_iv
-in android/local.properties.enc -out android/local.properties -d;
sudo docker run --rm -it --name electrum-android-native-builder-cont -v $PWD:/data
sudo docker run --rm -it --name electrum-android-native-builder-cont -v $PWD:/data
-e TRAVIS_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER --workdir=/data/android lightningcn/electrum_env:latest
/bin/bash -c 'cp debug.keystore ~/.android/debug.keystore && /data/android/gradlew app:assembleDebug';
else
sudo docker run --rm -it --name electrum-android-native-builder-cont -v $PWD:/data
sudo docker run --rm -it --name electrum-android-native-builder-cont -v $PWD:/data
-e TRAVIS_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER --workdir=/data/android lightningcn/electrum_env:latest
/bin/bash -c 'cp ~/android/local.properties local.properties && cp debug.keystore ~/.android/debug.keystore && /data/android/gradlew app:assembleDebug';
fi
Expand All @@ -69,7 +69,7 @@ deploy:
provider: releases
api_key: $GITHUB_API_KEY
file_glob: true
file:
file:
- "android/app/build/outputs/apk/MainNetOnekey/debug/*.apk"
- "android/app/build/outputs/apk/MainNetOnekey/release/*.apk"
- "android/app/build/outputs/apk/TestNetOnekey/debug/*.apk"
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Genjix - Porting pro-mode functionality to lite-gui and worked on server
Slush - Work on the server. Designed the original Stratum spec.
Julian Toash (Tuxavant) - Various fixes to the client.
rdymac - Website and translations.
kyuupichan - Miscellaneous.
kyuupichan - Miscellaneous.
2 changes: 1 addition & 1 deletion RELEASE-NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ issue #3374. Users should upgrade to 3.0.5.
run "python3 setup.py install" in order to install the new
dependencies.

* Segwit support:
* Segwit support:

- Native segwit scripts are supported using a new type of
seed. The version number for segwit seeds is 0x100. The install
Expand Down
2 changes: 1 addition & 1 deletion android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && \
apt-get install -y gettext openjdk-8-jdk-headless unzip wget
RUN echo "progress=dot:giga" > .wgetrc

# install Python 3.8
# install Python 3.8
RUN apt install -y python3.8 libpython3.8-minimal libpython3.8-dev libpython3.8-stdlib python3-distutils

RUN filename=sdk-tools-linux-4333796.zip && \
Expand Down
2 changes: 1 addition & 1 deletion android/app/proguard-android-optimize-wallet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@

-keepclasseswithmembers class * {
@androidx.annotation.Keep <init>(...);
}
}
2 changes: 1 addition & 1 deletion android/app/proguard-dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,4 @@ Mmmmmm
Mmmmm
Mmmm
Mmm
Mm
Mm
2 changes: 1 addition & 1 deletion android/app/src/main/assets/initParams.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"hostID": "8080808080808080",
"crt": "7F2181E89310434552545F4150505F45434B41303031420D6A75626974657277616C6C65745F200D6A75626974657277616C6C6574950200805F2504202005255F2404202505245300BF200EEF0C8D0A820182028203820482057F4946B041048FD3FAB3907C5CC8CD193EB2B653EA179115B7F305C9E21DE6D29C0736A3B82025B219F24BDA86D80F5AE262521E124F4C6691A0C47B1FB72D95895E9312CB0DF001005F3746304402204D75EAA2F09604A9597DA905D680EB619B8ADCF080E5AD6950E1DBF26195C9E2022067649AFB4A8BC380B382520499C6F2BB350A8519B0ECDBE0B7374AA898826D0E",
"sk": "B66BE8CB7512A6DFF741839EE8C5092D6987A5D7790E93B52EBB16FCD4EAD7AA"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,3 @@ protected void onDestroy() {
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -373,4 +373,3 @@ protected void onDestroy() {
});
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,3 @@ public void run() {
});
}
}




Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ protected void onRestart() {
super.onRestart();
finish();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ public void onViewClicked(View view) {
default:
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,3 @@ public void onViewClicked(View view) {
}
}
}




Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,3 @@ protected void onRestart() {
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ public void setmOnItemClickListener(OnItemClickListener mOnItemClickListener) {
this.mOnItemClickListener = mOnItemClickListener;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ protected void convert(BaseViewHolder helper, TransactionInfoBean.OutputAddrBean
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -382,4 +382,4 @@ public void setOneKeyVersion(String oneKeyVersion) {
public String toString() {
return new Gson().toJson(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,4 @@ public void setAddress(String address) {
this.address = address;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,3 @@ public void onButtonRequest(ButtonRequestEvent event) {
// finish();
// }
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public InitParameter(Context context, Tag tag) {
this.mContext = context;
this.mTag = tag;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ public class NativeApi {

public static native String[] nativeBTCGetAddress(long contextID, String json);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ public static String getJsonStr(Context context, String name) {
return "";
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ public static String byte2HexStr(byte b) {
char d = (char)(j > 9 ? 'A' + j%10 : '0' + j);
return "" + c + d;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ protected void onCreate(Bundle savedInstanceState) {
// of the task stack
finish();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public class DfuService extends DfuBaseService {
protected Class<? extends Activity> getNotificationTarget() {
/*
* As a target activity the NotificationActivity is returned, not the MainActivity. This is because the notification must create a new task:
*
*
* intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
*
*
* when user press it. Using NotificationActivity we can check whether the new activity is a root activity (that means no other activity was open before)
* or that there is other activity already open. In the later case the notificationActivity will just be closed. System will restore the previous activity.
* However if the application has been closed during upload and user click the notification a NotificationActivity will be launched as a root activity.
* It will create and start the main activity and terminate itself.
*
*
* This method may be used to restore the target activity in case the application was closed or is open. It may also be used to recreate an activity
* history (see NotificationActivity).
*/
Expand All @@ -34,4 +34,4 @@ protected boolean isDebug() {
// return BuildConfig.DEBUG;
return true;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public ButtonRequestEvent(int type) {
public int getType() {
return type;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ public ByteFormatException() {
public ByteFormatException(String message) {
super(message);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,4 @@ public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ public static boolean contains(Context context, String name, String key) {
public static boolean hasWallet(Context context) {
return !PreferencesManager.getAll(context, org.haobtc.onekey.constant.Constant.WALLETS).isEmpty();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
}
return super.onKeyDown(keyCode, event);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,4 @@ protected void onDestroy() {
public boolean isRestricted() {
return super.isRestricted();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public void initView() {
public void initData() {

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,

return view;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ public void onViewClicked(View view) {
break;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,4 @@ protected void onDestroy() {
EventBus.getDefault().unregister(this);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ public void onViewClicked(View view) {
break;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ private void screenTipDialog(Context context, @LayoutRes int resource) {
dialogBtoms.setCanceledOnTouchOutside(true);
dialogBtoms.show();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,4 @@ public void onViewClicked(View view) {
public void onFinish(ExitEvent exitEvent) {
finish();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,3 @@ public void onDestroy () {
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ public boolean needEvents() {
return true;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ public interface onMaxListener {
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ public static String addHexPrefix(String hex) {
}
return String.format("0x%s", hex.toLowerCase(Locale.getDefault()));
}
}
}
Loading