Skip to content

Commit

Permalink
opt:Push message format from github to telegram channel
Browse files Browse the repository at this point in the history
  • Loading branch information
lingqiqi5211 committed Mar 26, 2024
1 parent b32ab8d commit f147e7c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ jobs:
name: HyperCeiler Canary
path: ${{ env.APK_FILE_CANARY }}

- name: Commit
run: |
text="${{ github.event.sha }} ${{ github.event.head_commit.message }}"
echo "commit=$(echo $text | sed 's/\([][\\`.*^$\/+?{}()=!|:-]\)/\\\1/g')" >> $GITHUB_ENV
- name: Post to Canary Channel
if: ${{ github.ref == 'refs/heads/main' && github.ref_type != 'tag' && contains(github.event.head_commit.message, '[skip post]') == false && contains(github.event.head_commit.message, 's#') == false }}
shell: bash
Expand All @@ -80,11 +75,10 @@ jobs:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
CANARY: ${{ env.APK_FILE_CANARY }}
COMMIT_MESSAGE: |+
**New push to github\!**
`${{ env.commit }}`
by ${{ github.event.head_commit.author.name }}
New push to GitHub Action
```
${{ github.event.head_commit.message }}
```by `${{ github.event.head_commit.author.name }}`
See commit detail [here](${{ github.event.head_commit.url }})
run: |
ESCAPED=$(python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))')
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/android_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ jobs:
GROUP_DEBUG_ID: ${{ secrets.GROUP_DEBUG_ID }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
DEBUG: ${{ env.APK_FILE_DEBUG }}
COMMIT_MESSAGE: |+
**New PR to gitHub\!**
by ${{ github.triggering_actor }}
COMMIT_MESSAGE: |+
New push to GitHub Action
by `${{ github.triggering_actor }}`
See commit detail [here](${{ github.event.head_commit.url }})
run: |
ESCAPED=$(python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))')
cd ${{ github.workspace }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@
import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isAndroidVersion;
import static com.sevtinge.hyperceiler.utils.devicesdk.SystemSDKKt.isMoreHyperOSVersion;

import android.content.Intent;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.SpannableString;
import android.view.View;

import androidx.annotation.NonNull;
Expand All @@ -45,11 +43,9 @@

import com.sevtinge.hyperceiler.R;
import com.sevtinge.hyperceiler.prefs.PreferenceHeader;
import com.sevtinge.hyperceiler.prefs.RecommendPreference;
import com.sevtinge.hyperceiler.prefs.TipsPreference;
import com.sevtinge.hyperceiler.ui.MainActivityContextHelper;
import com.sevtinge.hyperceiler.ui.fragment.base.SettingsPreferenceFragment;
import com.sevtinge.hyperceiler.ui.fragment.helper.CantSeeAppsFragment;
import com.sevtinge.hyperceiler.ui.fragment.helper.HomepageEntrance;
import com.sevtinge.hyperceiler.utils.PackagesUtils;
import com.sevtinge.hyperceiler.utils.ThreadPoolManager;
Expand Down Expand Up @@ -193,10 +189,10 @@ public void isOfficialRom() {
public boolean getIsOfficialRom() {
return (
!getBaseOs().startsWith("V") &&
!getBaseOs().startsWith("Xiaomi") &&
!getBaseOs().startsWith("Redmi") &&
!getBaseOs().startsWith("POCO") &&
!getBaseOs().isEmpty()
!getBaseOs().startsWith("Xiaomi") &&
!getBaseOs().startsWith("Redmi") &&
!getBaseOs().startsWith("POCO") &&
!getBaseOs().isEmpty()
) ||
!getRomAuthor().isEmpty() ||
Objects.equals(SystemSDKKt.getHost(), "xiaomi.eu") ||
Expand Down

0 comments on commit f147e7c

Please sign in to comment.