Ref T12270. Add transaction validation for name, alias, award, revoke. Change auto subscribe for authors. Fix some typos.
Details
Details
- Reviewers
epriestley - Maniphest Tasks
- T12270: Unbeta Badges
- Commits
- rPeec6cd865c85: Miscellanous badge fixes
Add badge, award badge, revoke badge, edit badge.
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Branch
- misc-badges-clean-up (branched from master)
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 15768 Build 20845: Run Core Tests Build 20844: arc lint + arc unit
Event Timeline
src/applications/badges/xaction/PhabricatorBadgesBadgeAwardTransaction.php | ||
---|---|---|
66 | haha ha haaa |
Comment Actions
I think there's a bug? Does awarding to two users at the same time work?
src/applications/badges/xaction/PhabricatorBadgesBadgeAwardTransaction.php | ||
---|---|---|
65 | Does this actually work? Isn't getNewValue() a list of recipients? | |
66 | ya this looks a whole lot like copy-pasta buddy | |
src/applications/badges/xaction/PhabricatorBadgesBadgeFlavorTransaction.php | ||
41–44 | Prefer %s + new PhutilNumber() so we can extract a translation hint and render large numbers in a fancy readable way like "1,234" instead of "1234". | |
src/applications/badges/xaction/PhabricatorBadgesBadgeRevokeTransaction.php | ||
55–77 | Instead, maybe just validate that the recipient is currently awarded, but ignore their PHID type? That's a little more future-proof, and I think we'll currently crash if you un-award a badge to a user who doesn't have it. |