Skip to content

fix: contributorAcceptedEntryRole drops the author's profile URL when matching the "authored" role #5764

Description

@JSONbored

Goal

Make the "authored" contributor-role match consider entry.authorProfileUrl, the same way the "submitted" match already considers entry.submittedByUrl.

Why this matters

An author whose display name doesn't slug-match a registered contributor, but whose GitHub profile URL would, is currently never credited for authoring the entry.

Current behavior

apps/web/src/data/contributors.ts, lines 46-61:

const submitted = contributorMatchesIdentity(contributor, entry.submittedBy, entry.submittedByUrl);
const authored = contributorMatchesIdentity(contributor, entry.author);

contributorMatchesIdentity(contributor, name, profileUrl) accepts a profile URL as a third, stronger identity signal. The submitted check passes it (entry.submittedByUrl); the authored check omits the parallel entry.authorProfileUrl entirely — even though that field exists on Entry (apps/web/src/types/registry.ts:151) and is used correctly elsewhere in this same file, e.g. findContributorForIdentity(entry.author, entry.authorProfileUrl) (lines 199/207).

Desired behavior

The authored check passes entry.authorProfileUrl as the third argument to contributorMatchesIdentity, matching the submitted check's pattern and the file's own findContributorForIdentity usage.

Scope

  • apps/web/src/data/contributors.ts (the authored computation only)
  • focused tests

Out of scope

  • findContributorForIdentity (already correct)
  • The submitted check (already correct)

Acceptance criteria

  • PR includes Closes #<issue>.
  • An entry whose author name doesn't slug-match a contributor but whose authorProfileUrl does now correctly registers as "authored" by that contributor.
  • Existing name-based matches are unaffected.

Quality evidence required in the PR

  • No visual impact; include a before/after test case showing the fixed match.

Validation

pnpm build
pnpm exec vitest run tests/contributors.test.ts
git diff --check

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.5x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions