all-contributors / all-contributors/cli

make the bot work with rst files

Abierto
#300 10 comentarios 0 reacciones 1 asignado Reclamado por @tenshiAMD Ver en GitHub
pinned priority: high status: available type: enhancement
Lenguaje dominante
JavaScript
Estrellas
425
Forks
149
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**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 (`

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.