Skip to content

Commit

Permalink
feat: 规则维护更新 (#313)
Browse files Browse the repository at this point in the history
* perf: resetMatch 使用默认值

* fix(YouTube): 自动翻译评论

* feat(支付宝): 支付后自动点击完成

* docs(QQ): 添加快照

* docs: update docs

* fix(知乎): 首页信息流广告
  • Loading branch information
aoguai authored Nov 2, 2024
1 parent 85ac817 commit 82980eb
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 27 deletions.
29 changes: 14 additions & 15 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,44 @@
name: Bug report
description: 提交一个 BUG
name: 问题反馈 / Bug report
title: '[BUG] '
description: 反馈你遇到的问题 / Report the issue you are experiencing
body:
- type: markdown
attributes:
value: |
请按照此模版填写 BUG 界面的快照
感谢您花时间填写, 在提交问题之前, 请确保您完成以下操作
- type: checkboxes
id: checkboxes
attributes:
label: 一些验证
description: 在提交问题之前,请确保您完成以下操作
options:
- label: 检查这个问题是否属于 [本项目维护的规则](https://github.com/aoguai/subscription) 导致
- label: 请 **确保** 您已经检查这个问题是否属于 [本项目维护的规则](https://github.com/aoguai/subscription) 导致
required: true
- label: 请 **确保** 你的问题能在 [releases](https://github.com/gkd-kit/gkd/releases/latest) 发布的最新版本(包含测试版本)上复现 (如果不是请先更新到最新版本复现后再提交问题)
- label: 请 **确保** 您的问题能在 [GKD releases](https://github.com/gkd-kit/gkd/releases/latest) 发布的最新版本(包含测试版本)上复现 (如果不是请先更新到最新版本复现后再提交问题)
required: true
- label: 搜索检查是否已经存在请求相同功能的问题/讨论,以避免重复创建问题
- label: 请 **确保** 您已经搜索检查是否已经存在请求相同功能的问题/讨论,否则请在已有的issue下进行讨论,以避免重复创建问题
required: true
- label: 确认知晓并同意维护者直接关闭不符合 issue 规范的问题
- label: 请 **确保** 知晓并同意维护者直接关闭不符合 issue 规范的问题
required: true
- label: 确保提供下列BUG描述及其复现步骤, 否则我同意维护者直接关闭问题
- label: 请 **确保** 提供下列BUG描述及其复现步骤, 否则您的问题将会被直接关闭
required: true
- type: textarea
id: bug-1
attributes:
label: |
BUG描述
BUG描述(文字/截图/视频)
description: |
请输入 BUG描述及其复现步骤,请使用尽量准确的描述。
请输入 BUG 描述及其复现步骤,请使用尽量准确的描述, 否则你的问题将会被直接关闭
validations:
required: true
- type: textarea
id: feature-description
attributes:
label: |
请输入 误触/不执行规则 的界面的快照, 或者生成的快照链接。
请输入 误触/不执行规则 的界面的快照, 或者生成的快照链接。\
请注意: 不提供快照或者仅提供截图的 issue 将被自动关闭
description: |
快照是一个 zip 文件, 快照链接是类似 "https://i.gkd.li/import/XXXXXXXX" 或 "https://i.gkd.li/i/XXXXXXXX" 的文本, 按照如下方式可获得快照信息
按照下面的截图示例来给界面打快照, **上传文件或者生成链接**并粘贴到下面的输入框
![img](https://user-images.githubusercontent.com/45487685/270372181-9e05a475-6664-4e1b-adc7-1e3973fff01f.png)
快照是一个 zip 文件, 快照链接是类似 "https://i.gkd.li/import/XXXXXXXX" 或 "https://i.gkd.li/i/XXXXXXXX" 的文本。\
如果你不了解什么是快照,请先阅读[ GKD 相关文档](https://gkd.li/guide/snapshot)
validations:
required: true
5 changes: 3 additions & 2 deletions .github/workflows/add_labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
if: |
contains(github.event.issue.body, 'i.gkd.li/import') == false &&
contains(github.event.issue.body, 'i.gkd.li/i/') == false &&
contains(github.event.issue.body, 'f.gkd.li') == false &&
contains(github.event.issue.body, '.zip') == false
steps:
- name: Add labels
Expand All @@ -26,6 +27,6 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
你好 ${{ github.event.issue.user.login }}。由于您的 Issue 缺少必要的快照信息。请在评论中提供更多信息,以便我们更好地帮助您。谢谢!
您好 ${{ github.event.issue.user.login }}。由于您的 Issue 缺少必要的快照或信息。请在评论中提供更多相关且必要的信息,以便我们更好地帮助您。否则该 Issue 将在 3 天后关闭,谢谢!
Hello ${{ github.event.issue.user.login }}. Due to the lack of necessary snapshot information in your Issue, please provide more information in the comment so that we can better assist you. Thank you!
Hello, ${{ github.event.issue.user.login }}. Your issue lacks necessary snapshots or information. Please provide additional relevant and necessary details in the comments to help us assist you better. Otherwise, this issue will be closed in 3 days. Thank you!
1 change: 0 additions & 1 deletion src/apps/com.alicloud.databox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export default defineGkdApp({
activityIds:
'com.alipay.mobile.nebulax.integration.mpaas.activity.NebulaActivity$Main',
actionMaximum: 1,
resetMatch: 'activity',
matchTime: 10000,
rules: 'View[childCount=9] > @Image -2 View[childCount=5]',
snapshotUrls: 'https://i.gkd.li/import/13596924',
Expand Down
3 changes: 0 additions & 3 deletions src/apps/com.baidu.tieba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export default defineGkdApp({
enable: false,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'activity',
activityIds: [
'com.baidu.tbadk.browser.TBWebContainerActivity',
'com.baidu.tieba.frs.FrsActivity',
Expand Down Expand Up @@ -199,7 +198,6 @@ export default defineGkdApp({
matchDelay: 500,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'activity',
rules: [
{
key: 0,
Expand Down Expand Up @@ -263,7 +261,6 @@ export default defineGkdApp({
key: 12,
name: '功能类-贴吧内签到并关闭弹窗',
enable: false,
resetMatch: 'activity',
rules: [
{
key: 0,
Expand Down
9 changes: 6 additions & 3 deletions src/apps/com.eg.android.AlipayGphone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ export default defineGkdApp({
rules: [
{
activityIds: 'com.alipay.android.msp.ui.views.MspContainerActivity',
matches:
'[id="com.alipay.android.app:id/rl_nav_bar"] > [id="com.alipay.android.app:id/nav_right_textview"]',
snapshotUrls: 'https://i.gkd.li/import/14008852',
matches: ['[text="支付成功" || text="充值成功"]', '[text="完成"]'],
snapshotUrls: [
'https://i.gkd.li/import/14008852',
'https://i.gkd.li/i/17503266',
'https://i.gkd.li/i/16328809',
],
},
],
},
Expand Down
4 changes: 3 additions & 1 deletion src/apps/com.google.android.youtube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@ export default defineGkdApp({
rules: [
{
fastQuery: true,
actionCd: 500,
activityIds:
'com.google.android.apps.youtube.app.watchwhile.MainActivity',
matches:
'@Button[desc^="翻译成中文"][clickable=true][visibleToUser=true] <<n [vid="results"]',
'@Button[desc^="翻译成中文"][clickable=true][visibleToUser=true] <<n [vid="results" || vid="section_list"]',
snapshotUrls: [
'https://i.gkd.li/i/17068544', // 翻译前
'https://i.gkd.li/i/17068647', // 翻译后
'https://i.gkd.li/i/17501400',
],
},
],
Expand Down
1 change: 0 additions & 1 deletion src/apps/com.tencent.mm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export default defineGkdApp({
enable: false,
matchTime: 10000,
actionMaximum: 2,
resetMatch: 'activity',
activityIds: [
'.plugin.webwx.ui.ExtDeviceWXLoginUI',
'com.tencent.mm.plugin.webview.ui.tools.SDKOAuthUI',
Expand Down
5 changes: 5 additions & 0 deletions src/apps/com.tencent.mobileqq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ export default defineGkdApp({
'https://i.gkd.li/import/13476400',
'https://i.gkd.li/import/14155603',
'https://i.gkd.li/import/14217033',
'https://i.gkd.li/i/13255493',
'https://i.gkd.li/i/16323755',
'https://i.gkd.li/i/17529150',
],
excludeSnapshotUrls: [
'https://i.gkd.li/i/14414585', // 误触
'https://i.gkd.li/i/15075866', // 误触
'https://i.gkd.li/i/15782476', // 误触
Expand Down
8 changes: 7 additions & 1 deletion src/apps/com.zhihu.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default defineGkdApp({
},
{
key: 90,
preKeys: [0, 1, 2, 3],
preKeys: [0, 1, 2, 3, 4],
matches:
'@[clickable=true] >(1,3) [text$="不感兴趣"|| text^="屏蔽作者"]',
snapshotUrls: [
Expand All @@ -100,6 +100,12 @@ export default defineGkdApp({
matches: '[vid="confirm_uninterest"]',
snapshotUrls: ['https://i.gkd.li/i/15024032'],
},
{
key: 93,
preKeys: [0, 1, 2, 3, 4],
matches: '[text="减少相似内容推荐"]',
snapshotUrls: ['https://i.gkd.li/i/17606926'],
},
],
},
{
Expand Down

0 comments on commit 82980eb

Please sign in to comment.