Thanks for considering a contribution. Jtech is one Discourse plugin that wraps five sub-plugins. Each sub-plugin keeps its own Ruby namespace, settings prefix, and master enable switch — so your change should usually live entirely inside one sub-plugin's territory.
See README.md for the directory map. The short version:
plugin.rb— master registration; do not duplicateenabled_site_settingor magic-header keys.sub_plugins/<name>.rb— each old plugin's body, instance_eval'd. Edit the relevant one.lib/<namespace>/— pure Ruby helpers per sub-plugin.app/,db/migrate/,assets/,public/— standard Discourse plugin layout.config/settings.yml— one section per admin tab. Keep setting keys unchanged in PRs that only reorganize.config/locales/{server,client}.en.yml— every site setting must have a translation in one or the other.
- Fork → branch off
main. - Make your change. Stay inside one sub-plugin where possible. Don't introduce cross-sub-plugin coupling without raising it in the PR description.
- Run lint locally:
pnpm install bundle install pnpm lint # ESLint + Prettier + Stylelint + template-lint bundle exec rubocop # Ruby
- Run the relevant specs in a Discourse dev install:
# From your Discourse root, with this plugin symlinked into plugins/ bundle exec rake plugin:spec[jtech]
- Open a PR. The template will ask which sub-plugin you touched and how you tested.
- Ruby:
rubocop-discourse+syntax_tree—bundle exec stree write Gemfile *.rb sub_plugins/*.rb lib/**/*.rbif anything's off. - JS /
.gjs: ESLint + Prettier via@discourse/lint-configs.pnpm lint:fixrewrites for you. - SCSS: Stylelint via
@discourse/lint-configs/stylelint. Samelint:fix. - Comments: Don't restate what the code does. Comment why when a constraint isn't obvious.
- Add to
config/settings.ymlunder the rightjtech_*section. Always declaredefault:andclient:(useclient: falseif unsure). - Add a translation in
config/locales/server.en.yml(admin label) orclient.en.yml(if used by JS UI). - Reference the setting via
SiteSetting.<name>in Ruby; never duplicate its value as a constant. - If it gates behavior, early-return when it's disabled rather than wrapping the whole module.
- Add the top-level key to
config/settings.yml. - Add a translation under
en.site_settings.categories.<key>inconfig/locales/server.en.yml.
Use the GitHub issue templates. Tag which sub-plugin is affected — it speeds up routing.
See SECURITY.md for the disclosure policy. Don't open public issues for vulnerabilities.
By contributing you agree your work will ship under the project's GPL-3.0 license.