봇 설정
.all-contributorsrc
JSON 파일을 업데이트하여 all-contributors bot 동작을 구성 할 수 있습니다. The data used to generate the contributors list will be stored there, and you can configure how you want @all-contributors
to generate the list.
CLI Configuration 과 유사한 봇 구성입니다.🤖
지정할 수있는 키는 다음과 같습니다.
옵션 | 내용 | 예제/기본값 |
---|---|---|
projectName | 필수 옵션인 프로젝트 이름. | 예: all-contributors-cli |
projectOwner | 필수적 옵션인 프로젝트가 호스팅되는 사용자의 이름. | Example: tenshiAMD |
repoType | 리포지토리 유형. github 와 gitlab 둘중에 하나. | 기본값: github |
repoHost | 리포지토리 호스트를 가리킵니다. 자가 호스팅 리포지토리를 사용하는 경우 변경하십시오. | 기본값: repoType 이 github 이면 https://github.com 으로, repoType 이 gitlab 이면 https://gitlab.com |
files | 업데이트 할 파일의 배열. | 기본값: ['README.md'] |
imageSize | 사용자의 아바타 크기 (픽셀 단위) 입니다. | 기본값: 100 |
commit | 기여자를 자동 추가 할 때 자동 커밋 배지. | 기본값: false |
commitConvention | Commit convention (angular , atom , ember , eslint , jshint , gitmoji , or none ). | Default: angular |
contributorsPerLine | Contributors 테이블의 최대 열 수. | 기본값: 7 |
contributorsSortAlphabetically | true : 알파벳순으로 정렬. false : 추가 순서대로 표시. | 기본값: false |
badgeTemplate | Lodash 템플릿을 정의하여 배지를 생성하세요. | |
contributorTemplate | Lodash 템플릿을 정의하여 기여자를 생성하세요. | |
wrapperTemplate | Define your own lodash template to wrap the list of contributors | |
types | 기여 유형에 대한 사용자 기호 또는 링크 템플리트를 지정하세요. 문서화 된 유형을 대체 할 수 있습니다. | |
linkToUsage | Adds a footer with link to usage (either true or false ) | Default: true |
skipCi | Makes the CI ignore the commit. (either true or false ) | Default: true |
contributors | 이 프로젝트의 참여자 목록입니다. @ all-contributors add 에 의해 업데이트됩니다. |
{
"projectName": "all-contributors",
"projectOwner": "all-contributors",
"repoType": "github",
"repoHost": "https://github.com",
"files": ["README.md"],
"imageSize": 100,
"commit": false,
"contributorsPerLine": 7,
"contributorsSortAlphabetically": false,
"badgeTemplate": "[](#contributors)",
"contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>",
"wrapperTemplate": "\n<table>\n <tbody><%= bodyContent %> </tbody>\n<%= tableFooterContent %></table>\n\n",
"types": {
"custom": {
"symbol": "🔭",
"description": "A custom contribution type.",
"link": "[<%= symbol %>](<%= url %> \"<%= description %>\"),"
}
},
"linkToUsage": true,
"skipCi": true,
"contributors": []
}
All Contributors 테이블을 다른 파일로 옮기기
아시다시피 컨트리뷰터 테이블의 기본 파일은 README.md
입니다. 하지만 프로젝트에 많은 기여자가 있는 경우 README.md
파일에 모든 기여자분을 테이블을 포함하는 것은 관리하기가 힘듭니다. 그런 상황에는 다른 파일에 기여자를 입력할 수 있습니다.
많은 기여자가 있을 때에는 다음과 같이 구조를 바꾸어 보세요. 이 튜토리얼에서는 CONTRIBUTORS.md
파일로 All Contributors 테이블을 변경합니다.
먼저 봇을 설치하세요. 설치 하는 방법은 봇 설치를 참고 하세요.
첫 번째 기여자를 추가합니다. 추가하는 방법은 봇 사용을 참고 하세요.
CONTRIBUTORS.md
파일을 만드세요.Copy the code which can be found in this guide.
새 파일 이름과 일치하도록
.all-contributorsrc
JSON 파일의files
키를 수정하세요.{ "files": [ "CONTRIBUTORS.md" ], ... }
Now you should be good to go. New contributors will be added to this new file instead of the
README.md
file.