Skip to content

Commit d53d5c6

Browse files
feat: add descriptions
1 parent 7ce6ba2 commit d53d5c6

File tree

3 files changed

+70
-50
lines changed

3 files changed

+70
-50
lines changed

internal/config/plugins.go

+61-46
Original file line numberDiff line numberDiff line change
@@ -4,79 +4,94 @@ import "github.com/go-semantic-release/plugin-registry/internal/plugin"
44

55
var Plugins = plugin.Plugins{
66
{
7-
Type: "provider",
8-
Name: "github",
9-
Repo: "go-semantic-release/provider-github",
7+
Type: "provider",
8+
Name: "github",
9+
Repo: "go-semantic-release/provider-github",
10+
Description: "A provider plugin that uses the GitHub API to publish releases.",
1011
},
1112
{
12-
Type: "provider",
13-
Name: "gitlab",
14-
Repo: "go-semantic-release/provider-gitlab",
13+
Type: "provider",
14+
Name: "gitlab",
15+
Repo: "go-semantic-release/provider-gitlab",
16+
Description: "A provider plugin that uses the GitLab API to publish releases.",
1517
},
1618
{
17-
Type: "changelog-generator",
18-
Name: "default",
19-
Repo: "go-semantic-release/changelog-generator-default",
19+
Type: "changelog-generator",
20+
Name: "default",
21+
Repo: "go-semantic-release/changelog-generator-default",
22+
Description: "A changelog generator plugin that generates a changelog based on the commit messages since the last release.",
2023
},
2124
{
22-
Type: "commit-analyzer",
23-
Name: "cz",
24-
Aliases: []string{"default"},
25-
Repo: "go-semantic-release/commit-analyzer-cz",
25+
Type: "commit-analyzer",
26+
Name: "cz",
27+
Aliases: []string{"default"},
28+
Repo: "go-semantic-release/commit-analyzer-cz",
29+
Description: "A commit analyzer plugin that uses the Conventional Commits specification to determine the type of release to create based on the commit messages since the last release.",
2630
},
2731
{
28-
Type: "condition",
29-
Name: "default",
30-
Repo: "go-semantic-release/condition-default",
32+
Type: "condition",
33+
Name: "default",
34+
Repo: "go-semantic-release/condition-default",
35+
Description: "The fallback CI condition plugin that detects the current git branch and does not prevent any release.",
3136
},
3237
{
33-
Type: "condition",
34-
Name: "github",
35-
Repo: "go-semantic-release/condition-github",
38+
Type: "condition",
39+
Name: "github",
40+
Repo: "go-semantic-release/condition-github",
41+
Description: "A CI condition plugin for GitHub Actions that checks if the current branch should trigger a new release.",
3642
},
3743
{
38-
Type: "condition",
39-
Name: "gitlab",
40-
Repo: "go-semantic-release/condition-gitlab",
44+
Type: "condition",
45+
Name: "gitlab",
46+
Repo: "go-semantic-release/condition-gitlab",
47+
Description: "A CI condition plugin for GitLab CI that checks if the current branch should trigger a new release.",
4148
},
4249
{
43-
Type: "files-updater",
44-
Name: "npm",
45-
Repo: "go-semantic-release/files-updater-npm",
50+
Type: "files-updater",
51+
Name: "npm",
52+
Repo: "go-semantic-release/files-updater-npm",
53+
Description: "A files updater plugin that updates the version in the package.json file.",
4654
},
4755
{
48-
Type: "provider",
49-
Name: "git",
50-
Repo: "go-semantic-release/provider-git",
56+
Type: "provider",
57+
Name: "git",
58+
Repo: "go-semantic-release/provider-git",
59+
Description: "A provider plugin that uses git tags directly to publish releases. This works with any git repository.",
5160
},
5261
{
53-
Type: "condition",
54-
Name: "bitbucket",
55-
Repo: "go-semantic-release/condition-bitbucket",
62+
Type: "condition",
63+
Name: "bitbucket",
64+
Repo: "go-semantic-release/condition-bitbucket",
65+
Description: "A CI condition plugin for Bitbucket Pipelines that checks if the current branch should trigger a new release.",
5666
},
5767
{
58-
Type: "files-updater",
59-
Name: "helm",
60-
Repo: "go-semantic-release/files-updater-helm",
68+
Type: "files-updater",
69+
Name: "helm",
70+
Repo: "go-semantic-release/files-updater-helm",
71+
Description: "A files updater plugin that updates the version in the Chart.yaml file.",
6172
},
6273
{
63-
Type: "hooks",
64-
Name: "goreleaser",
65-
Repo: "go-semantic-release/hooks-goreleaser",
74+
Type: "hooks",
75+
Name: "goreleaser",
76+
Repo: "go-semantic-release/hooks-goreleaser",
77+
Description: "A hooks plugin that runs GoReleaser to publish releases. The GoReleaser binary is bundled with the plugin.",
6678
},
6779
{
68-
Type: "hooks",
69-
Name: "npm-binary-releaser",
70-
Repo: "go-semantic-release/hooks-npm-binary-releaser",
80+
Type: "hooks",
81+
Name: "npm-binary-releaser",
82+
Repo: "go-semantic-release/hooks-npm-binary-releaser",
83+
Description: "A hooks plugin that runs npm-binary-releaser to publish the released binaries to npm.",
7184
},
7285
{
73-
Type: "hooks",
74-
Name: "plugin-registry-update",
75-
Repo: "go-semantic-release/hooks-plugin-registry-update",
86+
Type: "hooks",
87+
Name: "plugin-registry-update",
88+
Repo: "go-semantic-release/hooks-plugin-registry-update",
89+
Description: "A hooks plugin that updates the plugin registry after a new release.",
7690
},
7791
{
78-
Type: "hooks",
79-
Name: "exec",
80-
Repo: "go-semantic-release/hooks-exec",
92+
Type: "hooks",
93+
Name: "exec",
94+
Repo: "go-semantic-release/hooks-exec",
95+
Description: "A hooks plugin that executes commands after a new release.",
8196
},
8297
}

internal/plugin/plugin.go

+8-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ import (
1313
)
1414

1515
type Plugin struct {
16-
Type string
17-
Name string
18-
Aliases []string
19-
Repo string
16+
Type string
17+
Name string
18+
Aliases []string
19+
Repo string
20+
Description string
2021
}
2122

2223
var CollectionPrefix = "dev"
@@ -28,6 +29,7 @@ type fsPluginData struct {
2829
LatestRelease *struct{} `firestore:",omitempty"`
2930
Versions *struct{} `firestore:",omitempty"`
3031
UpdatedAt *struct{} `firestore:",omitempty"`
32+
Description *struct{} `firestore:",omitempty"`
3133
}
3234

3335
type fsPluginReleaseData struct {
@@ -175,6 +177,8 @@ func (p *Plugin) getPlugin(ctx context.Context, db *firestore.Client) (*registry
175177
return nil, dErr
176178
}
177179
pluginData.Plugin.UpdatedAt = res.UpdateTime
180+
// description is a static value that is not stored in firestore
181+
pluginData.Plugin.Description = p.Description
178182

179183
// resolve latest release
180184
res, err = pluginData.LatestReleaseRef.Get(ctx)

pkg/registry/registry.go

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ type Plugin struct {
1515
Type string
1616
Name string
1717
URL string
18+
Description string
1819
LatestRelease *PluginRelease
1920
Versions []string
2021
UpdatedAt time.Time

0 commit comments

Comments
 (0)