Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Populate contributors arrays from AUTHORS directories #58

Closed
wants to merge 2 commits into from

Conversation

kemitchell
Copy link

This pull request adds a new way to populate contributors arrays from the file system.

In pseudocode, current to proposed:

  IF there's no contributors array in package.json
    IF AUTHORS is a file
      read it and populate contributors
+   ELSE IF AUTHORS is a directory
+     read its files and populate contributors

AUTHORS is a super neat idea, but as an append-only file, it creates merge conflicts when, say, multiple pull requests each add a different new contributor's information to the end of the same AUTHORS file.

The Unix-hermit, command-line way to address this is to tell Git to use a different merge strategy:

AUTHORS merge=union

Such files feel like cruft, and GitHub won't apply them, making pushbutton merges impossible. (See isaacs/github#487.) Apparently folks like pushing the button.

An AUTHORS directory of files containing AUTHORS text solves the problem by adding files to a directory (a set) instead of appending lines to a file (a list). Folks might use their GitHub handles as filenames, for instance, and include comment lines to summarize what they've
contributed.

There are some potentially neat applications, like my own https://github.com/berneout/per-contributor-certificate-test.

Thanks to all!

@othiym23 othiym23 added the review label Feb 7, 2016
@kemitchell
Copy link
Author

@kemitchell
Copy link
Author

I'd consider using AUTHORS.d instead, and concatenating files there to any existing AUTHORS.

That's 100% interface. It matches the convention with some Linux config files (like Debian's /etc/apt/sources.list.d and /etc/rcX.d), but I'm not sure how widespread those conventions are.

@zkat zkat closed this Mar 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants