Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions plugins/changelog/ioredis.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package changelog

import "github.com/patch-it-dev/patch-it-plugins/core/plugin"

func init() {
const page = "providers/redis-ioredis.md"
plugin.RegisterProvider(plugin.Provider{
ID: "redis", Name: "Redis", Category: plugin.CategoryDatabases, Homepage: "https://redis.io",
Sources: []plugin.Source{sdk(page, "ioredis", RedisIoredis, "npm:ioredis")},
})
}

// RedisIoredis is ioredis' semantic-release CHANGELOG.md: "## [X.Y.Z](...)"
// with "### BREAKING CHANGES"; tagged vX.Y.Z.
var RedisIoredis = File{API: "redis/ioredis", Package: "ioredis", Ecosystem: "npm",
Repo: "redis/ioredis", TagPrefix: "v", Path: "CHANGELOG.md"}
9 changes: 9 additions & 0 deletions plugins/changelog/ioredis_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package changelog

import "testing"

func TestIoredisSDKs(t *testing.T) {
checkSDKs(t, []sdkCase{
{RedisIoredis, "5.0.0", "4.31.0", "redis-ioredis-5.0.0-CHANGELOG.md", "", "5.0.0-beta.4"},
})
}
24 changes: 24 additions & 0 deletions plugins/changelog/octokit.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package changelog

import "github.com/patch-it-dev/patch-it-plugins/core/plugin"

func init() {
const page = "providers/github-octokit.md"
plugin.RegisterProvider(plugin.Provider{
ID: "github", Name: "GitHub", Category: plugin.CategoryDevTools, Homepage: "https://github.com",
Sources: []plugin.Source{
sdk(page, "octokit-rest", OctokitRest, "npm:@octokit/rest"),
sdk(page, "octokit-net", OctokitNet, "nuget:Octokit"),
},
})
}

// Octokit's SDKs keep no changelog file: each GitHub release's notes are it
// (semantic-release's "### BREAKING CHANGES" for rest.js, "Breaking
// changes" lists for octokit.net); tagged vX.Y.Z.
var (
OctokitRest = File{API: "github/octokit-rest", Package: "@octokit/rest", Ecosystem: "npm",
Repo: "octokit/rest.js", TagPrefix: "v", Notes: true}
OctokitNet = File{API: "github/octokit-net", Package: "Octokit", Ecosystem: "nuget",
Repo: "octokit/octokit.net", TagPrefix: "v", Notes: true}
)
10 changes: 10 additions & 0 deletions plugins/changelog/octokit_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package changelog

import "testing"

func TestOctokitSDKs(t *testing.T) {
checkSDKs(t, []sdkCase{
{OctokitRest, "18.0.0", "17.11.2", "github-octokit-rest-18.0.0-release.json", "github-octokit-rest-17.11.2-release.json", "17.11.2"},
{OctokitNet, "0.5.2", "0.5.1", "github-octokit-net-0.5.2-release.json", "github-octokit-net-0.5.1-release.json", "0.5.1"},
})
}
16 changes: 16 additions & 0 deletions plugins/changelog/posthog.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package changelog

import "github.com/patch-it-dev/patch-it-plugins/core/plugin"

func init() {
const page = "providers/posthog-go.md"
plugin.RegisterProvider(plugin.Provider{
ID: "posthog", Name: "PostHog", Category: plugin.CategoryAnalytics, Homepage: "https://posthog.com",
Sources: []plugin.Source{sdk(page, "go", PostHogGo, "go:github.com/posthog/posthog-go")},
})
}

// PostHogGo is posthog-go's changesets CHANGELOG.md: "## X.Y.Z" with "###
// Major Changes", each bullet starting with its commit; tagged vX.Y.Z.
var PostHogGo = File{API: "posthog/go", Package: "github.com/posthog/posthog-go", Ecosystem: "go", Module: "posthog",
Repo: "PostHog/posthog-go", TagPrefix: "v", Path: "CHANGELOG.md"}
9 changes: 9 additions & 0 deletions plugins/changelog/posthog_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package changelog

import "testing"

func TestPostHogGoSDKs(t *testing.T) {
checkSDKs(t, []sdkCase{
{PostHogGo, "2.0.0", "1.44.1", "posthog-go-2.0.0-CHANGELOG.md", "", "1.44.1"},
})
}
13 changes: 13 additions & 0 deletions plugins/changelog/testdata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ Read with `Plugin{File: ...}` (`sdks.go`); `golden/<provider>-<source>.json` is
| `cloudflare-python-5.6.0-CHANGELOG.md` | https://raw.githubusercontent.com/cloudflare/cloudflare-python/v5.6.0/CHANGELOG.md | `02ab9a9` | 2026-11-20 | Apache-2.0 (cloudflare-python); trimmed to the sections of 5.6.0 (the golden) and 5.4.0 (the drop test), each unchanged | "accounts:** The `create()` and `get()` methods have been removed from `client.accounts.subscriptions`. The `Subscript…" |
| `cloudflare-go-7.15.0-CHANGELOG.md` | https://raw.githubusercontent.com/cloudflare/cloudflare-go/v7.15.0/CHANGELOG.md | `d2f77a0` | 2026-11-20 | Apache-2.0 (cloudflare-go); trimmed to the sections of 7.15.0 (the golden) and 7.13.1 (the drop test), each unchanged | "rules:** the `ListCursor` and `ListCursorParam` types are removed." |
| `cloudflare-terraform-5.29.0-CHANGELOG.md` | https://raw.githubusercontent.com/cloudflare/terraform-provider-cloudflare/v5.29.0/CHANGELOG.md | `8e7a366` | 2026-11-20 | Apache-2.0 (terraform-provider-cloudflare); trimmed to the sections of 5.29.0 (the golden) and 5.28.1 (the drop test), each unchanged | "zone_dns_settings, account_dns_settings:** the deprecated `foundation_dns` attribute has been removed. On `cloudflare…" |
| `redis-ioredis-5.0.0-CHANGELOG.md` | https://raw.githubusercontent.com/redis/ioredis/v5.0.0/CHANGELOG.md | `b8e99b4` | 2026-11-20 | MIT (ioredis); trimmed to the sections of 5.0.0 (the golden) and 5.0.0-beta.4 (the drop test), each unchanged | "you very likely have never used it." |
| `posthog-go-2.0.0-CHANGELOG.md` | https://raw.githubusercontent.com/PostHog/posthog-go/v2.0.0/CHANGELOG.md | `ee5c496` | 2026-11-20 | MIT (posthog-go); trimmed to the sections of 2.0.0 (the golden) and 1.44.1 (the drop test), each unchanged | "fc05013: Remove `Capture.Library` and `Exception.Library`. Set `$lib` in the event's `Properties` instead, and set `$…" |

## SDK release notes

Read with `Plugin{File: ...}` and `Notes: true` (`sdks.go`): an SDK whose changelog is its GitHub releases' notes. Each file is one release as GitHub's API returns it, trimmed to the fields the reader uses.

| File | URL | Tag commit | Saved | License; trimming | Use |
|---|---|---|---|---|---|
| `github-octokit-rest-18.0.0-release.json` | https://api.github.com/repos/octokit/rest.js/releases/tags/v18.0.0 | `b4ab0db` | 2026-11-20 | MIT (rest.js); trimmed to `html_url`, `tag_name`, `name`, `published_at` and `body`, re-indented, values unchanged | golden |
| `github-octokit-rest-17.11.2-release.json` | https://api.github.com/repos/octokit/rest.js/releases/tags/v17.11.2 | `5306f37` | 2026-11-20 | MIT (rest.js); trimmed to `html_url`, `tag_name`, `name`, `published_at` and `body`, re-indented, values unchanged | drop test |
| `github-octokit-net-0.5.2-release.json` | https://api.github.com/repos/octokit/octokit.net/releases/tags/v0.5.2 | `4b61105` | 2026-11-20 | MIT (octokit.net); trimmed to `html_url`, `tag_name`, `name`, `published_at` and `body`, re-indented, values unchanged | golden |
| `github-octokit-net-0.5.1-release.json` | https://api.github.com/repos/octokit/octokit.net/releases/tags/v0.5.1 | `8a9e828` | 2026-11-20 | MIT (octokit.net); trimmed to `html_url`, `tag_name`, `name`, `published_at` and `body`, re-indented, values unchanged | drop test |

## Version lists

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"html_url": "https://github.com/octokit/octokit.net/releases/tag/v0.5.1",
"tag_name": "v0.5.1",
"name": "v0.5.1",
"published_at": "2014-10-07T18:06:28Z",
"body": "- New: added XML docs to NuGet package for Maximum Intellisense - #586 via @shiftkey\n"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"html_url": "https://github.com/octokit/octokit.net/releases/tag/v0.5.2",
"tag_name": "v0.5.2",
"name": "v0.5.2",
"published_at": "2014-10-14T12:28:46Z",
"body": "- New: Method to add repository to team - #546 via @kevfromireland\n- Fixed: PATCH parameters for releases, issues and pull requests are now nullable - #561 via @thedillonb\n\n**Breaking Changes:**\n- `PullRequestUpdate` removed unused fields: `Number`, `State`, `Base`, and `Head`\n- `ReleaseClient.Create` now accepts a `NewRelease` parameter (was `ReleaseUpdate`)\n- `ReleaseUpdate` no longer requires a `TagName` in the constructor (see `NewRelease`)\n- `ReleaseUpdate` now has nullable `Draft` and `Prerelease` properties - only\n set these if you want to apply changes to the API\n- `IssueUpdate.State` is now a nullable `ItemState`\n- `MilestoneUpdate.Number` is now removed\n- `MilestoneUpdate.State` is now a nullable `ItemState`\n"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"html_url": "https://github.com/octokit/rest.js/releases/tag/v17.11.2",
"tag_name": "v17.11.2",
"name": "v17.11.2",
"published_at": "2021-04-18T18:03:04Z",
"body": "### Bug Fixes\r\n\r\n* reverts changes in faulty 17.11.1 release"
}

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions plugins/changelog/testdata/golden/github-octokit-net.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"id": 1,
"fingerprint": "sha256:0480089f0ce05c60634ebc123e89916b2835c44388dec0fec747d0c0c204fcfc",
"api": "github/octokit-net",
"version": "0.5.2",
"previous_version": "0.5.1",
"change_type": "breaking",
"breaking": true,
"subject": {
"type": "package_release",
"ecosystem": "nuget",
"package": "Octokit",
"change": "removed_symbol",
"symbols": [
"MilestoneUpdate.Number"
]
},
"description": "`MilestoneUpdate.Number` was removed in Octokit 0.5.2: code using it fails.",
"migration_hint": "`MilestoneUpdate.Number` is now removed (Octokit's release notes for 0.5.2)",
"source_url": "https://github.com/octokit/octokit.net/releases/tag/v0.5.2",
"source_excerpt": "v0.5.2\nBreaking Changes:\n- `MilestoneUpdate.Number` is now removed",
"confidence": 1,
"detected_at": "2026-11-14T12:00:00Z"
}
]
Loading
Loading