Skip to content

Commit

Permalink
Merge branch 'master' into Issue-5930
Browse files Browse the repository at this point in the history
  • Loading branch information
gc authored Aug 6, 2024
2 parents 7c1d6db + cc17c1c commit 645d8e1
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Run Integration Tests
run: docker-compose up --build --abort-on-container-exit
run: docker compose up --build --abort-on-container-exit --remove-orphans && docker compose down --volumes --remove-orphans
20 changes: 20 additions & 0 deletions .github/workflows/rebase_command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: rebase-command
on:
repository_dispatch:
types: [rebase-command]
jobs:
rebase:
runs-on: ubuntu-latest
steps:
- uses: peter-evans/rebase@v3
id: rebase
with:
head: ${{ github.event.client_payload.pull_request.head.label }}
- name: Add reaction
if: steps.rebase.outputs.rebased-count == 1
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.REBASE_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: hooray
15 changes: 15 additions & 0 deletions .github/workflows/slash_command_dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Slash Command Dispatch
on:
issue_comment:
types: [created]
jobs:
slashCommandDispatch:
runs-on: ubuntu-latest
steps:
- name: Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@v3
with:
token: ${{ secrets.REBASE_TOKEN }}
commands: rebase
permission: write
issue-type: pull-request
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"dependencies": {
"@napi-rs/canvas": "^0.1.53",
"@oldschoolgg/toolkit": "git+https://github.com/oldschoolgg/toolkit.git#2813f25327093fcf2cb12bee7d4c85ce629069a0",
"@oldschoolgg/toolkit": "git+https://github.com/oldschoolgg/toolkit.git#cd7c6865229ca7dc4a66b3816586f2d3f4a4fbed",
"@prisma/client": "^5.17.0",
"@sapphire/ratelimits": "^2.4.9",
"@sapphire/snowflake": "^3.5.3",
Expand Down
8 changes: 4 additions & 4 deletions src/lib/combat_achievements/combatAchievements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ const indexesWithRng = entries.flatMap(i => i[1].tasks.filter(t => 'rng' in t));
export const combatAchievementTripEffect = async ({ data, messages, user }: Parameters<TripFinishEffect['fn']>[0]) => {
const dataCopy = deepClone(data);
if (dataCopy.type === 'Inferno' && !dataCopy.diedPreZuk && !dataCopy.diedZuk) {
(dataCopy as any).quantity = 1;
(dataCopy as any).q = 1;
}
if (dataCopy.type === 'Colosseum') {
(dataCopy as any).quantity = 1;
(dataCopy as any).q = 1;
}
if (!('quantity' in dataCopy)) return;
let quantity = Number(dataCopy.quantity);
if (!('q' in dataCopy)) return;
let quantity = Number(dataCopy.q);
if (Number.isNaN(quantity)) return;

if (data.type === 'TombsOfAmascut') {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/combat_achievements/hard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ export const hardCombatAchievements: CombatAchievement[] = [
monster: 'Tempoross',
desc: 'Subdue Tempoross, getting rewarded with 10 reward permits from a single Tempoross fight.',
rng: {
chancePerKill: 30,
chancePerKill: 5,
hasChance: data => data.type === 'Tempoross'
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/lib/combat_achievements/medium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ export const mediumCombatAchievements: CombatAchievement[] = [
monster: 'Skotizo',
desc: 'Kill Skotizo with no altars active.',
rng: {
chancePerKill: 15,
chancePerKill: 5,
hasChance: isCertainMonsterTrip(Monsters.Skotizo.id)
}
},
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/redis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test('Should add patron badge', async () => {
const user = await createTestUser();
expect(user.user.badges).not.includes(BadgesEnum.Patron);
const _redis = makeSender();
_redis.publish({
await _redis.publish({
type: 'patron_tier_change',
discord_ids: [user.id],
new_tier: 1,
Expand All @@ -31,7 +31,7 @@ test('Should remove patron badge', async () => {
const user = await createTestUser(undefined, { badges: [BadgesEnum.Patron] });
expect(user.user.badges).includes(BadgesEnum.Patron);
const _redis = makeSender();
_redis.publish({
await _redis.publish({
type: 'patron_tier_change',
discord_ids: [user.id],
new_tier: 0,
Expand All @@ -52,7 +52,7 @@ test('Should add to cache', async () => {
}))
});
const _redis = makeSender();
_redis.publish({
await _redis.publish({
type: 'patron_tier_change',
discord_ids: users.map(u => u.id),
new_tier: 5,
Expand All @@ -76,7 +76,7 @@ test('Should remove from cache', async () => {
}))
});
const _redis = makeSender();
_redis.publish({
await _redis.publish({
type: 'patron_tier_change',
discord_ids: users.map(u => u.id),
new_tier: 0,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,9 @@ __metadata:
languageName: node
linkType: hard

"@oldschoolgg/toolkit@git+https://github.com/oldschoolgg/toolkit.git#2813f25327093fcf2cb12bee7d4c85ce629069a0":
"@oldschoolgg/toolkit@git+https://github.com/oldschoolgg/toolkit.git#cd7c6865229ca7dc4a66b3816586f2d3f4a4fbed":
version: 0.0.24
resolution: "@oldschoolgg/toolkit@https://github.com/oldschoolgg/toolkit.git#commit=2813f25327093fcf2cb12bee7d4c85ce629069a0"
resolution: "@oldschoolgg/toolkit@https://github.com/oldschoolgg/toolkit.git#commit=cd7c6865229ca7dc4a66b3816586f2d3f4a4fbed"
dependencies:
decimal.js: "npm:^10.4.3"
deep-object-diff: "npm:^1.1.9"
Expand All @@ -664,7 +664,7 @@ __metadata:
peerDependencies:
discord.js: ^14.15.3
oldschooljs: ^2.5.9
checksum: 10c0/c83f2188e18ac1e7d79edd9ab06b7ab0f96f8774a404a26fd766d22606bd65a8def0c0a74d0f681c5bde0d7b5b5bbb16f829e751b4e75f6821a1baf5c62b2580
checksum: 10c0/42eaec1c99c671adab7b56ca7e11d37bf5a0e07d0f0da0a892cdf477a78c061ea131a43b1c578d09f1c6b02e05d1ce47db9586ad9a8de62679cc492c847c3fca
languageName: node
linkType: hard

Expand Down Expand Up @@ -4122,7 +4122,7 @@ __metadata:
dependencies:
"@biomejs/biome": "npm:^1.8.3"
"@napi-rs/canvas": "npm:^0.1.53"
"@oldschoolgg/toolkit": "git+https://github.com/oldschoolgg/toolkit.git#2813f25327093fcf2cb12bee7d4c85ce629069a0"
"@oldschoolgg/toolkit": "git+https://github.com/oldschoolgg/toolkit.git#cd7c6865229ca7dc4a66b3816586f2d3f4a4fbed"
"@prisma/client": "npm:^5.17.0"
"@sapphire/ratelimits": "npm:^2.4.9"
"@sapphire/snowflake": "npm:^3.5.3"
Expand Down

0 comments on commit 645d8e1

Please sign in to comment.