Skip to content

Commit b6932fd

Browse files
Fixed merge conflicts
2 parents eb10d0a + 67f2137 commit b6932fd

File tree

88 files changed

+23945
-30288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+23945
-30288
lines changed

.config/notice-file/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Notice.txt File Configuration
2+
3+
We are automatically generating Notice.txt by using first-level dependencies of the project. The related pipeline uses `config.yaml` stored in this folder.
4+
5+
6+
## Configuration
7+
8+
Sample:
9+
10+
```
11+
title: "Mattermost Playbooks"
12+
copyright: "©2015-present Mattermost, Inc. All Rights Reserved. See LICENSE for license information."
13+
description: "This document includes a list of open source components used in Mattermost Playbooks, including those that have been modified."
14+
search:
15+
- "go.mod"
16+
- "client/go.mod"
17+
dependencies: []
18+
devDependencies: []
19+
```
20+
21+
| Field | Type | Purpose |
22+
| :-- | :-- | :-- |
23+
| title | string | Field content will be used as a title of the application. See first line of `NOTICE.txt` file. |
24+
| copyright | string | Field content will be used as a copyright message. See second line of `NOTICE.txt` file. |
25+
| description | string | Field content will be used as notice file description. See third line of `NOTICE.txt` file. |
26+
| dependencies | array | If any dependency name mentioned, it will be automatically added even if it is not a first-level dependency. |
27+
| devDependencies | array | If any dependency name mentioned, it will be added when it is referenced in devDependency section. |
28+
| search | array | Pipeline will search for package.json/go.mod files mentioned here. Globstar format is supported ie. `x/**/go.mod`. |

.config/notice-file/config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "Mattermost GitHub Plugin"
3+
copyright: "©2018-present Mattermost, Inc. All Rights Reserved. See LICENSE.txt for license information."
4+
description: "This document includes a list of open source components used in the plugin, including those that have been modified."
5+
search:
6+
- "go.mod"
7+
- "webapp/package.json"
8+
dependencies: []
9+
devDependencies: []

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ on:
1111

1212
permissions:
1313
contents: read
14+
id-token: write
1415

1516
jobs:
1617
plugin-ci:
1718
uses: mattermost/actions-workflows/.github/workflows/plugin-ci.yml@main
1819
secrets: inherit
20+
with:
21+
golang-version: "1.23"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ server/plugin/manifest.go
1515

1616
# VS Code
1717
.vscode
18+
19+
# notice
20+
.notice-work

.golangci.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,34 @@ run:
33
modules-download-mode: readonly
44

55
linters-settings:
6+
goconst:
7+
min-len: 2
8+
min-occurrences: 2
69
gofmt:
710
simplify: true
811
goimports:
912
local-prefixes: github.com/mattermost/mattermost-plugin-github
1013
govet:
11-
check-shadowing: true
1214
enable-all: true
1315
disable:
1416
- fieldalignment
1517
misspell:
1618
locale: US
17-
revive:
18-
rules:
19-
- name: error-strings
20-
disabled: true
2119

2220
linters:
2321
disable-all: true
2422
enable:
2523
- bodyclose
26-
- errcheck
24+
# - errcheck
25+
# - goconst
2726
- gocritic
2827
- gofmt
2928
- goimports
30-
- gosec
29+
# - gosec
3130
- gosimple
3231
- govet
3332
- ineffassign
34-
- misspell
33+
# - misspell
3534
- nakedret
3635
- revive
3736
- staticcheck
@@ -43,11 +42,25 @@ linters:
4342

4443
issues:
4544
exclude-rules:
45+
- path: server/manifest.go
46+
linters:
47+
- deadcode
48+
- unused
49+
- varcheck
50+
- path: server/configuration.go
51+
linters:
52+
- unused
53+
- linters:
54+
- revive
55+
text: unused-parameter
56+
- linters:
57+
- revive
58+
text: var-naming
59+
- linters:
60+
- revive
61+
text: error-strings
4662
- path: _test\.go
4763
linters:
4864
- bodyclose
4965
- goconst
50-
- scopelint # https://github.com/kyoh86/scopelint/issues/4
51-
- path: server/plugin/webhook.go
52-
linters:
53-
- goconst
66+
- scopelint # https://github.com/kyoh86/scopelint/issues/4
File renamed without changes.

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ apply:
158158
## Install go tools
159159
install-go-tools:
160160
@echo Installing go tools
161-
$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1
161+
$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.7
162162
$(GO) install gotest.tools/[email protected]
163+
$(GO) install github.com/mattermost/mattermost-govet/v2@3f08281c344327ac09364f196b15f9a81c7eff08
163164

164165
## Runs eslint and golangci-lint
165166
.PHONY: check-style
@@ -178,6 +179,7 @@ ifneq ($(HAS_SERVER),)
178179
@echo Running golangci-lint
179180
$(GO) vet ./...
180181
$(GOBIN)/golangci-lint run ./...
182+
$(GO) vet -vettool=$(GOBIN)/mattermost-govet -license -license.year=2018 ./...
181183
endif
182184

183185
## Builds the server, if it exists, for all supported architectures, unless MM_SERVICESETTINGS_ENABLEDEVELOPER is set
@@ -224,6 +226,12 @@ bundle:
224226
rm -rf dist/
225227
mkdir -p dist/$(PLUGIN_ID)
226228
./build/bin/manifest dist
229+
ifneq ($(wildcard LICENSE.txt),)
230+
cp -r LICENSE.txt dist/$(PLUGIN_ID)/
231+
endif
232+
ifneq ($(wildcard NOTICE.txt),)
233+
cp -r NOTICE.txt dist/$(PLUGIN_ID)/
234+
endif
227235
ifneq ($(wildcard $(ASSETS_DIR)/.),)
228236
cp -r $(ASSETS_DIR) dist/$(PLUGIN_ID)/
229237
endif

0 commit comments

Comments
 (0)