-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to put .all-contributorsrc
in subfolders?
#328
Comments
.all-contributorsrc
in subfolders?
You make a good point, yeah, that feature would be useful. PR welcome. |
Is it possible to provide some guide, like, pointers to the code that reads the config file? It would be helpful for whoever wants to work on this feature, it could be me or someone else. |
Sure, you'll need to look at https://github.com/all-contributors/all-contributors-cli and https://github.com/all-contributors/all-contributors-cli/blob/master/src/cli.js would be a good start. |
Thanks. I plan to work on bot -> cli -> documentation, because I use bot the most. For implementation details, I'm thinking of the most straightforward way by adding a try-catch around the So it would become something like: let content: rawOptionsFileContent;
let sha;
try {
({content, sha} = await this.repository.getFile(ALL_CONTRIBUTORS_RC));
} catch (error) {
if (error instanceof ResourceNotFoundError) {
({content, sha} = await this.repository.getFile(".github/" + ALL_CONTRIBUTORS_RC));
}
} This way, no other code is affected, most of the time there's no overhead. And if users put the config file under What do you think? |
It may be wiser to try doing that for the CLI first. Why? Because the bot relies on it (to an extent). Your implementation idea looks good to me. |
Sure if that's the case. May I ask how the bot is relying on the CLI? |
|
Hello. I wanted to know if a solution was finally found for this. I'm using All Contributors in my project but I don't want to have |
@GaryNLOL No, I have not worked on it. Feel free to take over if you want to. |
Is your feature request related to a problem? Please describe.
Right now it seems the
.all-contributorsrc
file can only be placed in the root folder. I would like to put it in the.github
folder, is it possible?Describe the solution you'd like
Not sure, but I feel we can relax the restriction by including
.github
as a valid location.Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: