all-contributors / all-contributors/cli

make the bot work with rst files

オープン
#300 コメント 10 件 リアクション 0 件 担当者 1 名 @tenshiAMD が担当を希望しています GitHub で見る
pinned priority: high status: available type: enhancement
主要言語
JavaScript
スター
425
フォーク
149
PR マージ指標
30日以内にマージされた PR はありません

説明

**Is your feature request related to a problem? Please describe.**
I use the following json file to pilot he all-contributor bot :

```json
{
"files": [
"AUTHORS.rst"
],
"imageSize": 100,
"contributorsPerLine": 7,
"contributorsSortAlphabetically": false,
"badgeTemplate": "-orange.svg?style=flat-square\" alt=\"All contributors\">",
"contributorTemplate": "\">\" width=\"<%= options.imageSize %>px;\" alt=\"\"/>
<%= contributor.name %>
",
"skipCi": true,
"contributors": [
{
"login": "12rambau",
"name": "Rambaud Pierrick",
"avatar_url": "https://avatars.githubusercontent.com/u/12596392?v=4",
"profile": "https://12rambau.github.io/web-resume/",
"contributions": [
"code",
"ideas",
"question",
"doc",
"maintenance",
"review"
]
}
],
"projectName": "sepal-doc",
"projectOwner": "openforis",
"repoType": "github",
"repoHost": "https://github.com"
}
```

and I created the following AUTHOR.rst file to specify the placement of the final table elements :
```rst
Thanks goes to these wonderful people (`emoji key `_):

.. raw:: html



All contributors

.. raw:: html







Rambaud Pierrick



This project follows the `all-contributors `_ specification.
Contributions of any kind are welcome!
```

But when I launch the bot, the indentation change and the file is broken. In short, .rst files are snesible to indentation inside the `raw` directive and the bot is always rewritting from to very left without identation ending up breaking the rst file.

**Describe the solution you'd like**
So the problem is indentation, and it would be nothing to change :

in the CLI tools (https://github.com/all-contributors/all-contributors-cli/blob/e9c1f55beb2c18391a5d5f0c9e8243dc3f89ebe3/src/generate/index.js#L7) we parse the text and search for the starting point of the table.
To be working with RST, the code should detect the indentation of this message (`

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。