Skip to content

Commit

Permalink
chore: merge upstream/main to dev
Browse files Browse the repository at this point in the history
  • Loading branch information
PalmDevs committed Dec 26, 2024
1 parent 89f1b18 commit 395e1e9
Show file tree
Hide file tree
Showing 71 changed files with 1,839 additions and 819 deletions.
191 changes: 191 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
name: Bug report
description: Create a bug report to help us improve
title: "[bug]: <insert title here>"
labels: [bug]
body:
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> ## Before you submit this issue...
> We might reject any issues that can't be solved within the repository, or reports that are too general. For example:
>
> <details>
> <summary><b>"Bunny crashes upon starting..."</b></summary>
> > There are lots of different things that could be causing this, but it's probably not related to this repository.
> </details>
> <details>
> <summary><b>"Bunny freezes on splash screen..."</b></summary>
> > The issue is too general and should be reported only when it occurs after an update to a specific Discord version or after a specific action or configuration has been made within Bunny.
> </details>
> <details>
> <summary><b>"Bunny refuses to install/stuck on downloading..."</b></summary>
> > This is an external issue (sideloading) that does not have a place in this repository. If it's a problem with Bunny Manager, report it to the <a href="https://github.com/pyoncord/BunnyManager">appropriate repository</a>.
> </details>
>
> If you think that your problem belongs to one of these, you should avoid submitting this report unless you are told to do so.
>
> Please report the problem or ask for help in the appropriate place. For example, if the problem occurs in BunnyManager, report it in the BunnyManager repository. If an error occurs when trying to sideload the prepatched IPA, reach out support for the sideloader you're using.
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: You should ensure the completion of the task before proceeding to check it off the checklist. Neglecting to do so may impede the efficiency of the issue resolution process. The developer has the right to delete the issue directly if you check the list blindly.
options:
- label: I am able to reproduce the bug with the latest version of Bunny and Discord.
required: true
- label: I've checked that there is no open or closed issue about this bug.
required: true
- label: The title of this issue accurately describes the bug.
required: true
- label: This is not a feature request or a general question.
required: true
- label: This bug can be reproduced consistently and is not caused by a plugin.
required: true
- label: I have read the notes above and ensured that my issue is clear and within this repository.
required: true

- type: textarea
id: reproduce-steps
attributes:
label: Steps to reproduce the bug
description: What did you do for the bug to show up?
placeholder: |
Example:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
placeholder: |
Example:
"This should happen..."
validations:
required: true

- type: textarea
id: actual-behavior
attributes:
label: Actual behavior
placeholder: |
Example:
"This happened instead..."
validations:
required: true

- type: textarea
id: sreen-media
attributes:
label: Screenshots/Screen recordings
description: |
A picture or video helps us understand the bug more.
You can upload them directly in the text box.
- type: textarea
id: logs
attributes:
label: Logs
description: |
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell

- type: dropdown
id: platform
attributes:
label: What platform did you produce this issue on?
options:
- Android
- iOS
validations:
required: true

- type: input
id: discord-version
attributes:
label: Discord version
description: |
The version of Discord you are using. You can find this in the settings. You may leave both the version number and the build number.
placeholder: |
Example:
"253.2 (66074)"
validations:
required: true

- type: input
id: version
attributes:
label: Version
description: |
The version of Bunny the issue is occuring on. You can find this in the settings. Bunny version is in formatted like the following: `beaf689-main` and NOT like this: `0.2.3`.
placeholder: |
Example:
"beaf689-main"
- type: input
id: loader-version
attributes:
label: Loader version
description: |
The version of the loader you are using. You can find this in the settings.
placeholder: |
Example:
"BunnyTweak (0.3.2)"
validations:
required: true

- type: input
id: device
attributes:
label: Device
description: |
The device model you are using.
placeholder: |
Example:
"iPhone 13 Pro Max"
validations:
required: true

- type: input
id: os-version
attributes:
label: OS version
description: |
The version of the operating system you are using.
placeholder: |
Example:
"iOS 15.0.1"
validations:
required: true

- type: textarea
id: debug-info
attributes:
label: Debug information
description: |
Debug information is important for the developer to understand the environment in which the bug occurred. You can get this information by sending `/debug` in the chat.
placeholder: |
Example:
Bunny: beaf689-main (BunnyXposed 0.2.4)
Discord: 255.2 (255202)
React: 18.3.1 (RN 0.74.5-discord-11)
Hermes: for RN 0.74.5-discord-11 (bcv96)
System: Android 13 (SDK 33)
Device: M2101K7BG (secret)
- type: textarea
id: additional-information
attributes:
label: Additional information
placeholder: |
Example:
"I have tried to do this..."
"This only happens in this situation..."
"This could be related to..."
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<<<<<<< HEAD
blank_issues_enabled: false
contact_links:
- name: 🗨 Discussions
url: https://discord.gg/ddcQf3s2Uq
about: Have something unspecific to Revenge in mind? Join us on Discord!
=======
blank_issues_enabled: false
>>>>>>> upstream/main
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Feature request
description: Suggest an idea for Bunny
title: "[feature]: <insert title here>"
labels: [enhancement]
body:
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: You should ensure the completion of the task before proceeding to check it off the checklist. Neglecting to do so may impede the efficiency of the issue resolution process. The developer has the right to delete the issue directly if you check the list blindly.
options:
- label: This is not a plugin request.
required: true
- label: I've checked that there is no other issue about this feature request.
required: true
- label: This issue contains only one feature request.
required: true
- label: The title of this issue accurately describes the feature request.
required: true

- type: textarea
id: feature-description
attributes:
label: Feature description
description: What feature you want Bunny to have? Provide detailed description about what it should look like or where it should be added.
validations:
required: true

- type: textarea
id: why-is-the-feature-requested
attributes:
label: Why do you want this feature?
description: Describe the problem or limitation that motivates you to want this feature to be added.
validations:
required: true

- type: textarea
id: additional-information
attributes:
label: Additional information
description: Add any other context or screenshots about the feature request here.
placeholder: |
Additional details and attachments.
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build
on:
push:
branches: [main, dev]
paths-ignore:
- "**/*.md"

jobs:
build:
name: Build and push
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout builds
uses: actions/checkout@v4
with:
repository: "bunny-mod/builds"
path: "builds"
token: ${{ secrets.BUILDS_TOKEN }}
ref: ${{ github.ref_name }}

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install pnpm and dependencies
run: |
npm i -g pnpm
pnpm i\
- name: Build
run: pnpm build --release-branch=${{ github.ref_name }} --build-minify

# TODO: Check for linting?

- name: Push builds
run: |
rm $GITHUB_WORKSPACE/builds/* || true
cp -r dist/* $GITHUB_WORKSPACE/builds || true
cd $GITHUB_WORKSPACE/builds
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add .
git commit -m "Build $GITHUB_SHA" || exit 0
git push
- name: Purge CDN cache
run: |
curl https://purge.jsdelivr.net/gh/pyoncord/bunny-build-infos@${{ github.ref_name }}/bunny.js
1 change: 1 addition & 0 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const {

let context = null;

/** @type {import("esbuild").BuildOptions} */
const config = {
entryPoints: ["src/entry.ts"],
bundle: true,
Expand Down
2 changes: 1 addition & 1 deletion scripts/serve.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if (args.adb && isADBAvailableAndAppInstalled()) {

if (key.name === "r") {
console.info(chalk.yellow(`${chalk.bold("↻ Reloading")} ${packageName}`));
restartAppFromADB(server.port)
restartAppFromADB(server.address().port)
.then(() => console.info(chalk.greenBright(`${chalk.bold("✔ Executed")} reload command`)))
.catch(e => console.error(e));
}
Expand Down
17 changes: 17 additions & 0 deletions src/core/debug/safeMode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { getCurrentTheme, writeThemeToNative } from "@lib/addons/themes";
import { BundleUpdaterManager } from "@lib/api/native/modules";
import { settings } from "@lib/api/settings";

export function isSafeMode() {
return settings.safeMode?.enabled === true;
}

export async function toggleSafeMode({
to = !isSafeMode(),
reload = true
} = {}) {
const enabled = (settings.safeMode ??= { enabled: to }).enabled = to;
const currentColor = getCurrentTheme();
await writeThemeToNative(enabled ? {} : currentColor?.data ?? {});
if (reload) setTimeout(() => BundleUpdaterManager.reload(), 500);
}
Loading

0 comments on commit 395e1e9

Please sign in to comment.