Skip to content

Handle case where no all-contributors table exists in file, but .all-contributorsrc exists in the repository #201

@jakebolam

Description

@jakebolam

Is your feature request related to a problem? Please describe.
The bot currently decides whether to 'init' (install the placeholders for the table and badge) for the README if there is no .all-contributorsrc file. If the file is found, it skips this step. This causes the bot to crash if a user has an .all-contributorsrc file but has nothing else.

Describe the solution you'd like
Handle the case where the .all-contributorsrc file exist, but the contentFiles (READMEs) have not been setup yet.

Describe alternatives you've considered
Better documentation?

Additional context
Code that determines whether to 'init'/setup/add place holders to contentFiles (READMEs):
https://github.com/all-contributors/all-contributors-bot/blob/master/src/tasks/processIssueComment/probot-processIssueComment.js#L50-L53

    await contentFiles.fetch(optionsConfig)
    if (optionsConfig.getOriginalSha() === undefined) {
        contentFiles.init()
    }

Table placeholders that are inserted into files during 'init':

 <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
 <!-- ALL-CONTRIBUTORS-LIST:END -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions