module

ContributorMural::SourceDefaults

What a source asserts about everyone it yields.

A source decides who is on the wall; these decide how they appear once they are on it — which section they are filed under, what the role line under their name reads, and where they stand in the ranking. All three are defaults rather than decisions: a users: entry still wins field by field, so the curated list carries the exceptions and nothing else.

Shared rather than written onto each block, because they mean the same thing on all four — and because it gives the API client one thing to be handed instead of a lengthening row of loose arguments.

Instance methods

group
Source
group=(group : String | Nil)
Source
role

The role line for everyone from this source: Code on contributors, Sponsor on sponsors. Without it a wall that uses roles to say what each person did has to name every code contributor in users: purely to write a role next to them — and the day someone lands their first commit they appear beside those entries with a blank line until a human notices.

Nothing is assumed for you: a source that does not name a role leaves the line off, as it always has. A role appearing under every face changes the size of the picture, which is not something to do to an existing wall on an upgrade.

Source
role=(role : String | Nil)

The role line for everyone from this source: Code on contributors, Sponsor on sponsors. Without it a wall that uses roles to say what each person did has to name every code contributor in users: purely to write a role next to them — and the day someone lands their first commit they appear beside those entries with a blank line until a human notices.

Nothing is assumed for you: a source that does not name a role leaves the line off, as it always has. A role appearing under every face changes the size of the picture, which is not something to do to an existing wall on an upgrade.

Source
validate_defaults(errors : Array(String), section : String) : Nil

Named by section, because the four blocks are otherwise indistinguishable in an error message.

Source
weight

Flattens every user this source yields onto one rung, replacing whatever the source itself counted — contribution counts, sponsor tier amounts.

Source
weight=(weight : Int32 | Nil)

Flattens every user this source yields onto one rung, replacing whatever the source itself counted — contribution counts, sponsor tier amounts.

Source