Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
1c8ebbe
[Misc] Remove unused `FieldPreventExplosiveMovesAbAttrParams` interfa…
Bertie690 Dec 21, 2025
bcfa87c
[Refactor] Add utility method `PokemonMove#isOutOfPP` (#6863)
Bertie690 Dec 23, 2025
3e2f5f1
[Dev] Move `jsconfig.json` to repository root (#6861)
Bertie690 Dec 23, 2025
0086773
Remove leftover `@ts-check` from `typedoc.config.js`
DayKev Dec 23, 2025
c0a13c5
Merge pull request #6894 from pagefaultgames/hotfix-1.11.5
DayKev Dec 25, 2025
0b5068b
Merge pull request #6897 from pagefaultgames/main
DayKev Dec 25, 2025
ce31382
[Docs] Add `typedoc-plugin-missing-exports` to doc site (#6892)
Bertie690 Dec 25, 2025
758a716
[Refactor] Remove `PokemonSummonData#illusionBroken` (#6872)
Bertie690 Dec 25, 2025
03f7a35
[Ability] Multiple abilities can now be replaced (#6901)
Mourouh Dec 26, 2025
914c719
[Dev] Update `pnpm` to `10.26.2`
DayKev Dec 26, 2025
7530a16
[i18n] Don't use `getPokemonNameWithAffix` for caught Pokemon (#6903)
DayKev Dec 27, 2025
8d7cb88
[Docs] Update README.md REUSE info (#6900)
Bertie690 Dec 27, 2025
c89c6f0
[Bug] Tar Shot no longer breaks with Normalize (#6889)
Bertie690 Dec 27, 2025
091e716
[Dev] Add constants for trainer friendship scaling (#6884)
fabske0 Dec 27, 2025
64c45b3
[Refactor] Remove `DEBUG_RNG` and `rngCounter` (#6555)
Bertie690 Dec 27, 2025
3140132
[Docs] Rewrite `comments.md` for clarity (#6816)
Bertie690 Dec 28, 2025
ae7f49c
[Refactor] Remove unused function `initLoggedInUser` (#6907)
Bertie690 Dec 28, 2025
119bbfd
[Refactor] Clean up various game data-related methods (#6570)
Bertie690 Dec 28, 2025
91d34bb
[Test] Modernize Phase Interceptor, move UI handling to `PromptHandler`
Bertie690 Dec 30, 2025
66a2bd4
[Refactor] Move `MovePhase` functions in call order (#6630)
Bertie690 Dec 31, 2025
dd2a230
[Refactor] Rearrange MEP methods in sequential order (#6753)
Bertie690 Dec 31, 2025
b8a38e5
Merge branch 'beta' into hotfix-1.11.6-beta
DayKev Jan 1, 2026
1c98fa3
Hotfix 1.11.6 to beta (#6926)
DayKev Jan 1, 2026
7e12e2f
[Dev] Add `test/@types/` to depcruiser type-only rules
DayKev Jan 1, 2026
c00afb6
[Misc] Fix `MovePhase` console logs (#6856)
Bertie690 Jan 1, 2026
d45d319
[Dev] Upgrade `noNegationElse` rule to error (#6932)
fabske0 Jan 2, 2026
fb59f9c
[Test] Remove `game.phaseInterceptor.restoreOg` (#6931)
Bertie690 Jan 2, 2026
4dda502
[Refactor] Use Phaser method chaining for `BattleScene.launchBattle`
Bertie690 Jan 2, 2026
f69071a
[Refactor] Add & apply method chaining to `SceneBase` load methods
Bertie690 Jan 2, 2026
65534b0
[Misc] Cleanup `executeIf` to not use `null` (#6925)
Bertie690 Jan 2, 2026
14dd6c0
[Bug] Allow Part Timer ME rewards to account for Amulet Coin (#5343)
demyinn00 Jan 2, 2026
055321c
[UI/UX] hide `save and quit` in title menu (#6902)
fabske0 Jan 3, 2026
0d0c744
[Docs] Assorted extremely minor doc fixes (#6908)
Bertie690 Jan 3, 2026
7376bd5
[UI] Fallback if legacy image doesn't exist (#6914)
fabske0 Jan 3, 2026
dd6034c
[Docs] Clean up Phase Priority Queue/speed order utils documentation
Bertie690 Jan 4, 2026
47a930d
[Dev] Strongly type Vite/Vitest configs; fix invalid options (#6933)
Bertie690 Jan 4, 2026
5f8a08b
[Dev] Simplify `update-submodules` commands (#6888)
DayKev Jan 4, 2026
e353b72
[Refactor] Move instruct's banlist into `invalid-moves.ts` (#6910)
Bertie690 Jan 4, 2026
809925f
[Bug][Refactor] `MoveTypeChangeAbAttr` no longer modifies move power
DayKev Jan 5, 2026
be228ea
[GitHub] Cancel stale workflows when a commit is pushed (#6937)
DayKev Jan 5, 2026
037f1a8
[Bug] [Balance] Trainers will now correctly not spawn 2 waves before …
Mourouh Jan 5, 2026
189b426
[Refactor] Move custom daily seeds to JSON (#6758)
fabske0 Jan 6, 2026
9ae0362
[Move] Make Instruct default to targeting allies instead of enemies (…
Ovdoes-dd Jan 7, 2026
bc8672f
chore: remove unused `json-stable-stringify` dependency (#6945)
Bertie690 Jan 8, 2026
c4a49fc
[Bug][UX] Pokédex now displays actual dex number for all forms (#6948)
U-tale Jan 9, 2026
1eb7584
github: add PR title lint workflow (#6943)
DayKev Jan 9, 2026
5053c3b
github: fix PR title lint script title parsing
DayKev Jan 9, 2026
397c066
i18n: add dialogue entries for some trainer types (#6947)
Madmadness65 Jan 10, 2026
653dfdf
github: rename `pr-title.ts` to `pr-title.mts` to prevent warning (#6…
DayKev Jan 10, 2026
a85bc2d
github: add `perf` as a valid PR title prefix (#6955)
DayKev Jan 10, 2026
4a49849
github: add link to info on formatting PR titles in workflow output
DayKev Jan 11, 2026
67cf0e3
balance: Make Daily Run starters use Stronger Evo Threshold (#6957)
Jimmybald1 Jan 11, 2026
8567fd5
github: GitHub Pages workflow only runs on changes to src files (#6956)
DayKev Jan 11, 2026
1844431
github: add path filters for various steps in linting workflow (#6959)
DayKev Jan 11, 2026
725eea0
refactor: Split up timed event manager file (#6952)
fabske0 Jan 11, 2026
c9ab9b3
github: add missing entries in lint workflow to outputs
DayKev Jan 11, 2026
2560ad4
github: fix commit detection for path change filters
DayKev Jan 11, 2026
cf8c2ca
dev: enable `.d.ts` CI typechecking & remove obsolete biome override
Bertie690 Jan 12, 2026
4302c86
chore: update `pnpm` to `10.28.0`
DayKev Jan 12, 2026
536c8de
test: update typing on test matchers (#6913)
Bertie690 Jan 12, 2026
a0f1e0e
i18n: Swedish addition (#6946)
Adri1 Jan 12, 2026
485ef4d
chore: bump assets and locale submodules (#6963)
SirzBenjie Jan 12, 2026
be9542d
refactor: consolidate animation code into a single helper class (#6739)
Bertie690 Jan 12, 2026
4e6b8a9
test: preserve text output of original shards (#6939)
Bertie690 Jan 12, 2026
be69ed2
test: enable v8 coverage instrumentation (#6934)
Bertie690 Jan 13, 2026
cd9ff33
fix: Fixed Spiky-Eared Pichu not generating in battles and eggs (#6966)
Madmadness65 Jan 13, 2026
1d53f54
chore: bump biome version to 2.3.11; add more lint rules (#6969)
Bertie690 Jan 13, 2026
60a9c50
github: fix coverage upload (#6968)
Bertie690 Jan 14, 2026
7fc2743
fix(move): Magnitude power values and thresholds set to correct values
DayKev Jan 15, 2026
2cc8dd1
dev: enable some options from TypeScript's "strict" mode
SirzBenjie Jan 15, 2026
e286f46
dev: add `".github/**/*.mts"` to `biome.jsonc` `includes`
DayKev Jan 15, 2026
88094b1
github: add missing `pnpm-lock.yaml` entry to `test-filters.yml`
DayKev Jan 15, 2026
4945e7d
fix(move): Variable power moves use pokemon friendship for trainers
fabske0 Jan 16, 2026
80c8e61
docs: the `#dev-corner` Discord channel was renamed to `#pokerogue-dev`
DayKev Jan 18, 2026
49dec15
refactor: remove redundant `Arena#getSpeciesFormIndex` method (#6686)
DayKev Jan 18, 2026
ccd3446
refactor(ui): don't display form name in battle info UI (#6942)
DayKev Jan 18, 2026
c0ac7f6
fix(ability): Color Change will now activate in the correct situations
DayKev Jan 19, 2026
9f4e108
test: fix typo in `to-have-status-effect.ts`
DayKev Jan 19, 2026
942c3f5
chore: update submodules
DayKev Jan 20, 2026
ba218e4
i18n: add Ukrainian language support (#6965)
Adri1 Jan 20, 2026
28cd331
chore: update submodules
DayKev Jan 21, 2026
d6914f9
chore: update Lodash sub-dep (#6994)
DayKev Jan 23, 2026
21281e6
chore: update `actions-cloudflare-purge` action and pin to SHA1
DayKev Jan 23, 2026
19ad7a6
chore: update submodules
DayKev Jan 24, 2026
c1f35df
chore: override `undici` sub-dep version to `>=6.23.0` (#6995)
DayKev Jan 24, 2026
b03c51f
misc: remove unused `TurnMove.turn` property (#6973)
Bertie690 Jan 24, 2026
49d5a6e
fix(move): update invalid move banlists (#6936)
Bertie690 Jan 24, 2026
b2862d9
fix: Properly increment ME chance on new waves (#6930)
emdeann Jan 24, 2026
3d683e0
fix(audio): Fix certain forms not playing their intended cries (#6960)
Madmadness65 Jan 24, 2026
92bd2fe
fix(ui): Icons will no longer overlap in run history for long texts (…
fabske0 Jan 24, 2026
c3e0603
dev: add Biome rule `lint/style/useNamingConvention` (#6992)
DayKev Jan 24, 2026
f1976b8
dev: add missing type import to `game-manager.ts` (#6998)
Bertie690 Jan 24, 2026
8d87b82
test: update documentation & default values for overrides, test helpe…
Bertie690 Jan 24, 2026
f1f5d0d
docs: update `CONTRIBUTING.md`, PR template (#6983)
Bertie690 Jan 24, 2026
3c1e701
fix(move): fix Heal Block mainline inconsistencies + add restriction …
Bertie690 Jan 24, 2026
c111032
github: remove indent in `pull_request_template.md`
DayKev Jan 25, 2026
ace010e
fix(ui): the Delete key works again in the key rebinding menu (#7003)
DayKev Jan 25, 2026
71be54c
refactor: split `ability.ts` into 3 files (#6991)
DayKev Jan 25, 2026
f17b0c3
fix(ability): Costar now copies allied crit stages (#6989)
DayKev Jan 25, 2026
2b8bd06
test: remove deprecated overloads for test functions (#6997)
DayKev Jan 25, 2026
464a251
fix: prevent double daily starters (#6980)
fabske0 Jan 25, 2026
e557cc4
fix(ui): Pokemon can no longer be released during MEs (#7002)
DayKev Jan 25, 2026
c6db4e0
dev: add `TupleRange` helper type (#7005)
fabske0 Jan 25, 2026
db68dee
refactor: clean up `PreLeaveFieldClearWeatherAbAttr` (#6740)
Bertie690 Jan 25, 2026
1455bbb
github: add `revert` as a valid PR title prefix
DayKev Jan 26, 2026
74553f6
fix(move): Stop showing message for damaging moves under Misty Terrain
scarlyle0 Jan 26, 2026
8ce8792
refactor: enable `exactOptionalPropertyTypes` in `tsconfig.json`
Bertie690 Jan 27, 2026
29fb428
test: add starting terrain override + terrain tests (#6866)
Bertie690 Jan 27, 2026
ddd32ba
test: use `if`/`else` instead of `.skipIf` in `terrain.test.ts`
DayKev Jan 28, 2026
51396d3
refactor: add `TIME_OF_DAY_OVERRIDE` & refactor arena tint code
Bertie690 Jan 28, 2026
e6b5741
misc: clean up `getLastXMoves` docs; fix callsites (#6974)
Bertie690 Jan 28, 2026
4acfc9f
refactor: clean up `getAttackTypeEffectiveness` and related moves
Bertie690 Jan 29, 2026
04f4497
misc: remove unused parameters from move restriction functions
Bertie690 Jan 29, 2026
e05e65f
refactor: cleanup MEP code slightly (#6808)
Bertie690 Jan 29, 2026
cfd28d4
github: fix `CONTRIBUTING.md` link in `pull_request_template.md`
DayKev Jan 31, 2026
5df957c
github: add `release` and `hotfix*` branches to PR title lint workflow
DayKev Jan 31, 2026
edcdf60
fix(move): restore third move failure sequence (#6949)
SirzBenjie Jan 31, 2026
5b91a8d
fix(ui): Show fusion name (#7010)
fabske0 Jan 31, 2026
9f542b0
fix(move): Copycat now ignores move sequence 2 failures (#6999)
Bertie690 Jan 31, 2026
85d54a5
chore: move `MoveTargetSet` out of `move.ts` (#7015)
Bertie690 Feb 1, 2026
761916a
chore: update locales submodule
DayKev Feb 1, 2026
7cc5cd9
i18n: replace hardcoded "Mode" text in `unlockables.ts` (#7009)
AddCycle Feb 1, 2026
dbf19c2
chore: update locales submodule
DayKev Feb 1, 2026
bbe86f8
refactor: clean up `challenge.ts` (#7013)
DayKev Feb 1, 2026
dcf5d63
misc: denest `PostTurnStatusEffectPhase` (#6984)
Bertie690 Feb 2, 2026
916e184
refactor: organize `Arena` class (#6993)
DayKev Feb 2, 2026
94a437e
refactor: optimize implementation of `Arena#applyTagsForSide`
Bertie690 Feb 2, 2026
53b4316
chore: update `pnpm` to `10.28.2`
DayKev Feb 2, 2026
457c596
misc: Add changelog script (#6893)
fabske0 Feb 3, 2026
1e6e91e
fix: fix missing slot id inside `TitlePhase` (#7021)
Bertie690 Feb 3, 2026
91c059d
github: add workflow to auto update submodules via label (#7014)
fabske0 Feb 4, 2026
58add16
balance(biomes): fix some Sub-Legendary rarities and locations (#7019)
damocleas Feb 5, 2026
0e2b0c9
test: add tests for Frustration & similar moves (#7016)
Bertie690 Feb 5, 2026
c06690a
dev: enable strict `import.meta.env` typechecking (#7026)
Bertie690 Feb 6, 2026
081b9ae
fix(battle): Use min `Def` to prevent infinite dmg (#7017)
fabske0 Feb 6, 2026
c2577ac
feat(ability): implement Battle Bond's stat boost effect (#7029)
DayKev Feb 7, 2026
47b939a
dev: stricten types of `import.meta.env` (#7027)
Bertie690 Feb 7, 2026
bc0bf98
test: disable stacktrace spam in Vitest VSCode extension v1.40.0+
Bertie690 Feb 7, 2026
3ac6014
feat: Add several new trainer types (#6771)
Madmadness65 Feb 8, 2026
e5d8cbe
github: use `pull_request_target` and `workflow_run` for label workflow
fabske0 Feb 8, 2026
b0c0f1f
fix: Label workflow fix part 2 (#7038)
fabske0 Feb 8, 2026
77f871d
refactor: clean up Roost code (#6871)
Bertie690 Feb 9, 2026
2ee687e
balance: catching and friendship won't increase candy past 9999 (#7041)
DayKev Feb 9, 2026
f76e895
misc: update copyright year in test boilerplate file
DayKev Feb 9, 2026
d861478
fix(move): Grudge no longer breaks on move-calling moves (#6972)
Bertie690 Feb 9, 2026
a21c0a2
balance: Passive and Egg Move Changes 1.11.7 (#7042)
damocleas Feb 10, 2026
248c5ae
fix: Anger Shell no longer triggers multiple times with Parental Bond…
Bertie690 Feb 10, 2026
ea05a08
balance: Rotom-ify the Starmobiles (#7044)
damocleas Feb 10, 2026
ebbee93
chore: update version to `1.11.7`
DayKev Feb 10, 2026
462e055
update submodules
damocleas Feb 10, 2026
ce13b3c
test: disable Roost test due to broken interaction
DayKev Feb 11, 2026
7d34673
feat: add more custom daily options (#6953)
fabske0 Feb 11, 2026
fac1061
balance: Elite 4 Fixes + General Trainer Adjustments (#7032)
Blitz425 Feb 11, 2026
122a131
fix: remove obsolete moveset length check from custom seeds (#7046)
fabske0 Feb 11, 2026
b0bc146
feat(ability): on-summon abilities now trigger on form change (#6707)
Bertie690 Feb 11, 2026
e311809
fix(move): add missing Telekinesis removal message (#7045)
Bertie690 Feb 11, 2026
9f8d5e1
update locales
damocleas Feb 11, 2026
6ffe6ae
feat(challenge): add Passives challenge (#7037)
fabske0 Feb 11, 2026
7e45534
balance: Update STAB Blacklist and Hardcoded Trainer Moveset Adjustme…
Blitz425 Feb 12, 2026
13fe940
fix(beta): stop off-field Pokemon from incorrectly form changing
DayKev Feb 12, 2026
e278d3a
feat(ui): Add rainbow tint for max candies (#7049)
fabske0 Feb 12, 2026
627c5c0
github: seperate out `beta` PRs from the changelog script (#7048)
fabske0 Feb 12, 2026
899a8b0
github: use `pull_request` over `pull_request_target` for changelog
DayKev Feb 12, 2026
2a8dd8a
github: add indenting to changelog script output (#7052)
fabske0 Feb 12, 2026
b7e9c8c
fix: daily starters won't be male only anymore (#7054)
fabske0 Feb 13, 2026
0022c23
balance(ability): Battle Bond uses the stat raising mode for fusions
DayKev Feb 13, 2026
bd89c76
chore: Update Submodules (#7055)
damocleas Feb 13, 2026
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
  •  
  •  
  •  
15 changes: 10 additions & 5 deletions .dependency-cruiser.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
+ "and thus should not contain anything with a bearing on runtime code.",
from: {},
to: {
path: "(^|/)src/@types",
path: ["(^|/)src/@types", "(^|/)test/@types"],
dependencyTypesNot: ["type-only"],
},
},
Expand All @@ -19,8 +19,8 @@ module.exports = {
severity: "error",
comment: "Files in 'enums/' and '@types/' must only use type imports.",
from: {
path: ["(^|/)src/@types", "(^|/)src/enums"],
pathNot: ["(^|/)src/@types/phaser[.]d[.]ts"],
path: ["(^|/)src/@types", "(^|/)src/enums", "(^|/)test/@types"],
pathNot: ["(^|/)src/@types/phaser[.]d[.]ts", "(^|/)test/@types/vitest[.]d[.]ts"],
},
to: {
dependencyTypesNot: ["type-only"],
Expand Down Expand Up @@ -172,7 +172,12 @@ module.exports = {
+ "from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration",
from: {
path: "^(src)",
pathNot: ["[.](?:spec|test|setup|script)[.](?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$", "./test"],
pathNot: [
"[.](?:spec|test|setup|script)[.](?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$",
"./test",
"(^|/)src/plugins/vite/.+[.]ts",
"(^|/)src/vite[.]env[.]d[.]ts",
],
},
to: {
dependencyTypes: ["npm-dev"],
Expand Down Expand Up @@ -210,7 +215,7 @@ module.exports = {
},
],
options: {
exclude: ["src/plugins/vite/*", "src/vite.env.d.ts"],
exclude: [],
/* Which modules not to follow further when encountered */
doNotFollow: {
/* path: an array of regular expressions in strings to match against */
Expand Down
130 changes: 79 additions & 51 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,73 @@
<!-- (Once you have read these comments, you are free to remove them) -->
<!-- Feel free to look at other PRs for examples -->
<!--
Make sure the title includes categorization (choose the one that best fits):
- [Bug]: If the PR is primarily a bug fix
- [Move]: If a move has new or changed functionality
- [Ability]: If an ability has new or changed functionality
- [Item]: For new or modified items
- [Mystery]: For new or modified Mystery Encounters
- [Test]: If the PR is primarily adding or modifying tests
- [UI/UX]: If the PR is changing UI/UX elements
- [Audio]: If the PR is adding or changing music/sfx (may come with an associated assets PR)
- [Sprite]: If the PR is adding or changing sprites (may come with an associated assets PR)
- [Balance]: If the PR is related to game balance
- [Challenge]: If the PR is adding or modifying challenges
- [Refactor]: If the PR is primarily rewriting existing code
- [Dev]: If the PR is primarily changing something pertaining to development (lefthook hooks, linter rules, etc.)
- [i18n]: If the PR is primarily adding/changing locale keys or key usage (may come with an associated locales PR)
- [Docs]: If the PR is adding or modifying documentation (such as tsdocs/code comments)
- [GitHub]: For changes to GitHub workflows/templates/etc
- [Misc]: If no other category fits the PR
Thank you for contributing to PokéRogue!
Open-source contributions like yours help keep this project going.

Note that these comment blocks are purely informative and can be removed once you're done reading them.
-->

<!--
Make sure that this PR is not overlapping with someone else's work
Please try to keep the PR self-contained (and small!)
Make sure your title matches the https://www.conventionalcommits.org/en/v1.0.0/ format.
Try to keep the title under 72 characters, as GitHub cuts off commit titles longer than this length.

See https://github.com/pagefaultgames/pokerogue/blob/beta/CONTRIBUTING.md#-submitting-a-pull-request
for more information on the allowed scopes and prefixes.

Example:
fix(move): Future Sight no longer crashes
^ ^ ^
| | |__ Subject
| |_________ Scope (optional)
|_____________ Prefix
-->

## What are the changes the user will see?
<!-- Summarize what are the changes from a user perspective on the application -->

## Why am I making these changes?
<!--
Explain why you decided to introduce these changes
Does it come from an issue or another PR? Please link it
Explain why you believe this can enhance user experience
Summarize the changes from a user perspective on the application.
Try to keep this section (relatively) brief as it is used to generate changelogs.
If you need to provide additional details, you can do so below the cutoff.

PRs with no user-facing changes should leave this blank or write "N/A" to be omitted from auto-generated changelogs.
-->

<!-- ## Changelog cutoff (DO NOT REMOVE/EDIT) -->

## Why am I making these changes?
<!--
If there are existing GitHub issues related to the PR that would be fixed,
you can add "Fixes #[issue number]" (ie: "Fixes #1234") to link an issue to your PR
so that it will automatically be closed when the PR is merged.
Explain why you decided to introduce these changes.
Does it come from another issue, PR or other prior discussion? Link to them if possible.
How can this can enhance user experience or otherwise improve the codebase?

Try to keep this explanation as objective as possible — avoid referring to personal feelings or making derogatory comments about existing code.

If this PR resolves an existing GitHub issue,
you can add "Fixes #[issue number]" (e.g.: "Fixes #1234") to link the issue.
(See https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue for more information.)
-->

## What are the changes from a developer perspective?
<!--
Explicitly state what are the changes introduced by the PR
You can make use of a comparison between what was the state before and after your PR changes
Ex: What files have been changed? What classes/functions/variables/etc have been added or changed?
Describe the changes this PR introduces to the codebase.
You can make use of a comparison between the state of the code before and after your changes.
Ex: What files have been changed? What classes/functions/variables/etc. have been added or changed?

Include enough detail to convey the scope of the changes being made and the rationale behind their implementation.
Feel free to include small code snippets if you think they will help illustrate your points.
-->

## Screenshots/Videos
<!--
If your changes are changing anything on the user experience, please provide visual proofs of it
Please take screenshots/videos before and after your changes, to show what is brought by this PR
If you are changing anything visual (UI/UX, locales changes, etc.), please include screenshot(s) and/or video(s) showing the changes within collapsible blocks, like below:

<details><summary>Before</summary>

[before screenshot here]

</details>
<details><summary>After</summary>

[after screenshot here]

</details>
-->

## How to test the changes?
Expand All @@ -63,21 +79,33 @@ Do the reviewers need to do something special in order to test your changes?
-->

## Checklist
- [ ] **I'm using `beta` as my base branch**
- [ ] There is no overlap with another PR?
- [ ] The PR is self-contained and cannot be split into smaller PRs?
- [ ] Have I provided a clear explanation of the changes?
- [ ] Have I tested the changes manually?
- [ ] Are all unit tests still passing? (`pnpm test:silent`)
- [ ] Have I created new automated tests (`pnpm test:create`) or updated existing tests related to the PR's changes?
- [ ] Have I provided screenshots/videos of the changes (if applicable)?
- [ ] Have I made sure that any UI change works for both UI themes (default and legacy)?
<!--
Please ensure the following requirements are all met before creating your PR.
If this is not the case, consider marking the PR as a draft (https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request) until all bullets have been resolved.

If an item or category isn't valid for the particular changes being made (for example, you didn't make any locales changes)
you can strike it out with the `~` character to mark them as not applicable.
-->

- The PR content is correctly formatted:
- [ ] **I'm using `beta` as my base branch**
- [ ] **The current branch is not named `beta`, `main` or the name of another long-lived feature branch**
- [ ] I have provided a clear explanation of the changes within the PR description
- [ ] The PR title matches the Conventional Commits format (as described in [CONTRIBUTING.md](https://github.com/pagefaultgames/pokerogue/blob/beta/CONTRIBUTING.md#pr-title-format))
- [ ] The PR is self-contained and cannot be split into smaller PRs
- [ ] There is no overlap with another open PR
- The PR has been confirmed to work correctly:
- [ ] I have tested the changes manually
- [ ] The full automated test suite still passes (use `pnpm test:silent` to test locally)
- [ ] I have created new automated tests (`pnpm test:create`) or updated existing tests related to the PR's changes if necessary
- [ ] I have provided screenshots/videos of the changes (if applicable)
- [ ] I have made sure that any UI changes work for both the default and legacy UI themes (if applicable)

Are there any localization additions or changes? If so:
- [ ] Has a locales PR been created on the [locales](https://github.com/pagefaultgames/pokerogue-locales) repo?
- [ ] If so, please leave a link to it here:
- [ ] Has the translation team been contacted for proofreading/translation?
- [ ] I have created an associated PR on the [locales](https://github.com/pagefaultgames/pokerogue-locales) repository
- If so, include a link to the PR here: _____
- [ ] I have contacted the Translation Team on Discord for proofreading/translation

Does this require any changes to the assets folder? If so:
- [ ] Has a PR been created on the [assets](https://github.com/pagefaultgames/pokerogue-assets) repo?
- [ ] If so, please leave a link to it here:
Does this require any additions or changes to in-game assets? If so:
- [ ] I have created an associated PR on the [assets](https://github.com/pagefaultgames/pokerogue-assets) repository
- If so, include a link to the PR here: _____
132 changes: 132 additions & 0 deletions .github/scripts/pr-title.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
/*
* SPDX-FileCopyrightText: 2024-2026 Pagefault Games
* SPDX-FileContributor: NightKev <https://github.com/DayKev>
* SPDX-FileContributor: OrangeRed <https://github.com/OrangeRed>
*
* SPDX-License-Identifier: AGPL-3.0-only
*/

// biome-ignore-all lint/performance/noNamespaceImport: This is the intended import method for these modules
import * as core from "@actions/core";
import * as github from "@actions/github";

const PREFIXES = [
"balance", // Primarily a balance change
"chore", // Misc project upkeep (e.g. updating submodules, updating dependencies, reverting a bad commit) not covered by other prefixes
"dev", // Improving the developer experience (such as by modifying lint rules or creating cli scripts)
"docs", // Primarily adding/updating documentation
"feat", // Adding a new feature (e.g. adding a new implementation of a move) or redesigning an existing feature
"fix", // Fixing a bug
"github", // Updating the CI pipeline or otherwise modifying something in the `./github/**` directory
"i18n", // Adding/modifying translation keys, etc
"misc", // A change that doesn't fit any other prefix
"perf", // A refactor aimed at improving performance
"refactor", // A change that doesn't impact functionality or fix any bugs (except incidentally)
"revert", // Reverting a bad commit
"test", // Primarily adding/updating tests or modifying the test framework
] as const;

type Prefixes = (typeof PREFIXES)[number];

const ALL_SCOPES = [
"ability",
"ai",
"audio",
"battle", // Relating to the general battle engine
"biomes",
"challenge",
"encounter", // Mystery Encounters
"event", // e.g. adding a Christmas event to the game
"graphics", // Anything related to art/graphics (adding new sprites, fixing a sprite that isn't displaying properly, etc)
"item",
"move",
"ui", // UI/UX
] as const;

type AllScopes = (typeof ALL_SCOPES)[number];

const PREFIX_SCOPE_MAP = {
balance: ["ability", "ai", "biomes", "challenge", "encounter", "event", "item", "move"],
chore: [],
dev: [],
docs: ALL_SCOPES,
feat: ALL_SCOPES,
fix: ALL_SCOPES,
github: [],
i18n: [],
misc: [],
perf: [],
refactor: ALL_SCOPES,
revert: [],
test: ALL_SCOPES,
} as const satisfies Record<Prefixes, readonly AllScopes[]>;

async function run(): Promise<void> {
try {
const authToken = core.getInput("github_token", { required: true });

const { eventName } = github.context;
if (eventName !== "pull_request") {
core.setFailed(`Invalid event: ${eventName}`);
return;
}

const client = github.getOctokit(authToken);
// The pull request info on the context isn't up to date.
// When the user updates the title and re-runs the workflow, it would be outdated.
// Therefore fetch the pull request via the REST API to ensure we use the current title.
const { data: pullRequest } = await client.rest.pulls.get({
owner: github.context.payload.pull_request!.base.user.login,
repo: github.context.payload.pull_request!.base.repo.name,
pull_number: github.context.payload.pull_request!.number,
});

const { title } = pullRequest;
core.info(
"Info on PR title formatting: https://github.com/pagefaultgames/pokerogue/blob/beta/CONTRIBUTING.md#-submitting-a-pull-request",
);
core.info(`Pull Request title: "${title}"`);

// if (title.length > 72) {
// core.setFailed(`Max title length of 72 exceeded! Current length: ${title.length}`);
// return;
// }

// Note: `!` allowed before `:` for changes including a save migrator and/or version increase
const info = `
Terminology: fix(move): Future Sight no longer crashes
^ ^ ^
| | |__ Subject
| |_________ Scope (optional)
|_____________ Prefix
`;

core.info(info.trim());

// Example usage of regex: https://regex101.com/r/FeN8jG/8
const regex = /^([a-z0-9]+)!?(\([a-z]+\))?: .+/;
if (!regex.test(title)) {
core.setFailed(`Pull Request title "${title}" failed to match - "Prefix(Scope): Subject"`);
return;
}

const regexResult = regex.exec(title);
const prefix = regexResult[1];
const scope = regexResult[2]?.replace(/[()]/g, "");

if (!PREFIXES.some(p => p === prefix)) {
core.setFailed(`Pull Request title "${title}" did not match any of the prefixes: [${PREFIXES}]`);
return;
}

// biome-ignore lint/style/useExplicitLengthCheck: doubles as a nullish check for `scope`
if (scope?.length && !PREFIX_SCOPE_MAP[prefix].includes(scope)) {
core.setFailed(`Pull Request title "${title}" has an invalid prefix (${prefix}) + scope (${scope}) combination!`);
return;
}
} catch (error) {
core.setFailed(error.message);
}
}

run();
7 changes: 4 additions & 3 deletions .github/test-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ all:
- ".github/workflows/test*.yml"
- ".github/test-filters.yml"
# top-level files
- "package*.json"
- "package.json"
- "pnpm-lock.yaml"
- ".nvrmc" # Updates to node version can break tests
- "vite*" # vite.config.ts, vite.vitest.config.ts, vitest.workspace.ts
- "tsconfig*.json" # tsconfig.json tweaking can impact compilation
- "tsconfig.json" # tsconfig.json tweaking can impact compilation
- "global.d.ts"
- ".env*"
- ".env*"
41 changes: 41 additions & 0 deletions .github/workflows/create-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Create Changelog
on:
pull_request:
branches:
- main

jobs:
Create-changelog:
if: github.repository == 'pagefaultgames/pokerogue'
name: Generate Changelog
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
sparse-checkout: |
.nvmrc
pnpm-lock.yaml
scripts
sparse-checkout-cone-mode: false

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"

- name: Install Node.js dependencies
run: pnpm add chalk octokit

- name: Generate Changelog
run: node scripts/changelog-reader/main.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
PR_BRANCH: ${{ github.event.pull_request.head.label }}
Loading
Loading