Skip to content

Commit 1dbbe59

Browse files
nevyangelovaNevyana Angelova
andauthored
Add CI actions and release automation for standard plugin release process (#199)
* Add CI actions and release automation for standard plugin release process * fix lint * fix lint --------- Co-authored-by: Nevyana Angelova <nevyangelova@Nevy-Macbook-16-2025.local>
1 parent 73085d8 commit 1dbbe59

18 files changed

+375
-204
lines changed

.github/codeql/codeql-config.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "CodeQL config"
2+
3+
query-filters:
4+
- exclude:
5+
problem.severity:
6+
- warning
7+
- recommendation
8+
- exclude:
9+
id: go/log-injection
10+
11+
paths-ignore:
12+
- '**/*_test.go'
13+
- '**/*.test.*'

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
groups:
8+
all:
9+
patterns:
10+
- "*"

.github/workflows/cd.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/ci.yaml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: ci
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
tags:
9+
- "v*"
10+
11+
jobs:
12+
plugin-ci:
13+
uses: mattermost/actions-workflows/.github/workflows/plugin-ci.yml@main
14+
secrets: inherit
15+
with:
16+
golangci-lint-version: v2.1.6
17+
18+
dist:
19+
uses: mattermost/actions-workflows/.github/workflows/plugin-dist-pr.yml@main
20+
secrets: inherit
21+
with:
22+
dist-target: "dist"
23+
s3-prefix: "mattermost-plugin-wrangler"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
schedule:
9+
- cron: '30 0 * * 0'
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
analyze:
16+
permissions:
17+
security-events: write
18+
name: Analyze
19+
runs-on: ubuntu-latest
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'go', 'javascript' ]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v4
32+
with:
33+
languages: ${{ matrix.language }}
34+
debug: false
35+
config-file: ./.github/codeql/codeql-config.yml
36+
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v4
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v4

.gitignore

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1-
.idea
21
dist
2+
bin
3+
vendor
4+
.npminstall
5+
.eslintcache
6+
7+
webapp/src/manifest.ts
8+
server/manifest.go
9+
10+
# Dev
11+
*.code-workspace
12+
13+
# Mac
314
.DS_Store
15+
16+
# Intellij
17+
.idea/
18+
19+
# VS Code
20+
.vscode

.golangci.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
version: 2
2+
3+
run:
4+
timeout: 5m
5+
modules-download-mode: readonly
6+
7+
linters-settings:
8+
goconst:
9+
min-len: 3
10+
min-occurrences: 2
11+
gofmt:
12+
simplify: true
13+
goimports:
14+
local-prefixes: github.com/mattermost/mattermost-plugin-wrangler
15+
govet:
16+
enable-all: true
17+
disable:
18+
- fieldalignment
19+
misspell:
20+
locale: US
21+
revive:
22+
23+
linters:
24+
disable-all: true
25+
enable:
26+
- bodyclose
27+
- errcheck
28+
- gocritic
29+
- gosec
30+
- govet
31+
- ineffassign
32+
- misspell
33+
- nakedret
34+
- revive
35+
- staticcheck
36+
- unconvert
37+
- unused
38+
- whitespace
39+
exclusions:
40+
rules:
41+
- linters:
42+
- revive
43+
text: var-naming|error-naming|exported|increment-decrement|error-strings|if-return|unused-parameter|blank-imports|empty-block|package-comments
44+
- linters:
45+
- errcheck
46+
text: Error return value
47+
- linters:
48+
- staticcheck
49+
text: SA1019
50+
- linters:
51+
- staticcheck
52+
text: ST1023
53+
- linters:
54+
- staticcheck
55+
text: ST1012
56+
- linters:
57+
- staticcheck
58+
text: ST1005
59+
- linters:
60+
- staticcheck
61+
text: QF1011
62+
- linters:
63+
- staticcheck
64+
text: QF1001
65+
- linters:
66+
- staticcheck
67+
text: QF1003
68+
- linters:
69+
- staticcheck
70+
text: QF1012
71+
- linters:
72+
- staticcheck
73+
text: QT1019
74+
- linters:
75+
- staticcheck
76+
text: QF1008
77+
- linters:
78+
- staticcheck
79+
text: QF1004
80+
- linters:
81+
- staticcheck
82+
text: ST1019
83+
- linters:
84+
- staticcheck
85+
text: QF1006
86+
- linters:
87+
- staticcheck
88+
text: QF1002
89+
- linters:
90+
- staticcheck
91+
text: QF1007
92+
- linters:
93+
- gosec
94+
text: G104
95+
- linters:
96+
- gosec
97+
text: G304
98+
- linters:
99+
- gosec
100+
text: G301
101+
102+
formatters:
103+
disable-all: true
104+
enable:
105+
- gofmt
106+
- goimports
107+
108+
issues:
109+
exclude-rules:
110+
- path: server/manifest.go
111+
linters:
112+
- unused
113+
- path: server/configuration.go
114+
linters:
115+
- unused
116+
- path: _test\.go
117+
linters:
118+
- bodyclose
119+
- goconst

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @mattermost/integrations

0 commit comments

Comments
 (0)