Update from Starter Template
Update this Mattermost plugin repository with common build/config files from the mattermost-plugin-starter-template and fix all linter issues.
Instructions
Phase 0: Prepare the repository
- •Switch to the main branch:
git checkout master(ormain) - •Pull latest changes:
git pull - •Create a new branch for the updates:
git switch -c update-from-starter-template
Phase 1: Update common files from starter template
Fetch and compare these files from mattermost/mattermost-plugin-starter-template (master branch):
Build files:
- •
build/manifest/*.go - •
build/pluginctl/*.go - •
build/setup.mk - •
Makefile
Config files:
- •
.editorconfig - •
.gitattributes - •
.github/workflows/ci.yml - •
.gitignore - •
.golangci.yml - •
.nvmrc - •
go.mod(for Go version only) - •
server/.gitignore
When updating:
- •Preserve plugin-specific customizations (plugin ID, custom targets)
- •Update tool versions (golangci-lint, gotestsum, Node.js)
- •Adopt new linter configurations
- •Update Go version in
go.modif the starter template uses a newer version (compare thegodirective). Also update the Go version in.github/workflows/ci.ymlto match. After updating, rungo mod tidyto updatego.sum - •Preserve license headers
Phase 2: Fix linter issues
- •Run
make check-styleto identify issues - •Install gofumpt if needed:
go install mvdan.cc/gofumpt@latest - •Run
gofumpt -w server/to auto-fix formatting - •Fix remaining issues manually
Phase 3: Verify and commit
- •Run
make testto verify all tests pass - •Run
make check-styleto confirm 0 issues - •Create a descriptive commit and PR. Use the pull request template from https://github.com/mattermost/.github/blob/master/PULL_REQUEST_TEMPLATE.md.
Example commit message
code
Update common files from starter template and fix linter issues
Troubleshooting
Mock files have linter errors:
- •Generated mocks may need regeneration:
go generate ./... - •Or exclude from linting if they're third-party generated