Skip to content

feat: pass contributor metadata to generator/notification plugins (enables First-Time-Contributor + Release MVP everywhere) #222

Description

@mwaldheim

Context

Three sibling plugins want to implement contributor-recognition features that are otherwise identical in spirit:

  • generator-changelog-html#26
  • generator-changelog-md#34
  • generator-release-notes#27

All three need per-commit author identity and whether that author is a first-time contributor to the repo, plus enough data to compute a 'Release MVP' (author with the most commits/PRs in the release window).

Problem

Today SEMREL_COMMITS only carries an array of raw commit message strings (see internal/cli/root.go). There is no author name/email/contribution-history data available to any plugin, so each generator would have to invent its own (inconsistent, likely wrong) heuristic — or shell out to git itself, which most plugins can't do since they only receive env vars.

Goal

Add a core contract, e.g. a new SEMREL_CONTRIBUTORS env var (JSON), populated by semrel core before invoking generator/hook plugins:

[
  {"name": "Jane Doe", "email": "jane@example.com", "commits": 3, "firstContribution": true}
]
  • firstContribution computed from full repo history (first commit by that email/author ever, not just in this release window)
  • Sorted or annotated so plugins can trivially derive 'Release MVP' (most commits/PRs this release)
  • Documented in the plugin protocol docs (semrel-docs) and schema (schema/v1.json)

Why core, not per-plugin

Doing this per-plugin means 3+ different heuristics and env var names. A single, well-defined contract lets every generator/hook plugin (changelog-md, changelog-html, release-notes, slack, teams, matrix, email hooks) opt into consistent 'first-time contributor' and 'Release MVP' recognition with a single implementation investment.

Related

Blocks: generator-changelog-html#26, generator-changelog-md#34, generator-release-notes#27

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions