# github-repository-distributor

> github-repository-distributor

Latest version **1.1.1** (published 2022-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install github-repository-distributor
pnpm add github-repository-distributor
yarn add github-repository-distributor
bun add github-repository-distributor
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-04-06 |
| First published | 2022-03-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 305.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | SonOfMagic |
| Maintainers | icebreaker |
| Keywords | markdown, README.md, Github Action, repository, distributor, github, md, ast |

## Links

- npm: https://www.npmjs.com/package/github-repository-distributor
- Repository: https://github.com/sonofmagic/github-repository-distributor
- Homepage: https://github.com/sonofmagic/github-repository-distributor#readme
- Issues: https://github.com/sonofmagic/github-repository-distributor/issues
- npm.io page: https://npm.io/package/github-repository-distributor

## Dependencies (1)

- [@octokit/rest](https://npm.io/package/@octokit/rest.md) ^18.12.0

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.1.1 (latest) — 2022-04-06
- 1.1.0 — 2022-03-20
- 1.0.1 — 2022-03-17
- 1.0.0 — 2022-03-17
- 0.0.3 — 2022-03-17
- 0.0.2 — 2022-03-16

## README

# github-repository-distributor

This action provides the following functionality for GitHub Actions users:

- get all your repos and group by lang.
- order your repos by last update time
- can be use by npm

## Usage

### Github Action

See [action.yml](action.yml) and [Demo](https://github.com/sonofmagic/projects)

**Basic:**
```yaml
steps:
- uses: actions/checkout@v2
- name: Use Node.js
  uses: actions/setup-node@v2
  with:
    node-version: 16
- name: Generate markdown files
  uses: sonofmagic/github-repository-distributor@main
  with:
    token: ${{ secrets.PERSONAL_TOKEN }} # your github personal token
    username: 'sonofmagic' # your github name
- name: Commit & Push changes
  uses: actions-js/push@master
  with:
    github_token: ${{ secrets.PERSONAL_TOKEN }} # your github personal token
```

### Nodejs

```bash
npm i github-repository-distributor
# or
yarn add github-repository-distributor
```

```js
const { main } = require('github-repository-distributor')

main({
  token: process.env.GITHUB_TOKEN,
  username: 'sonofmagic',
  filepath: 'test/fixtures/README.md',
  motto: false,
  title: 'Hello world!',
  includeFork: 'true'
})
```

### Options

| Name            | Type              | Description                                | Default Value |
| --------------- | ----------------- | ------------------------------------------ | ------------- |
| token           | string            | the repo PAT or GITHUB_TOKEN               |               |
| username        | string            | github username to generate markdown files |               |
| filepath        | string            | main markdown file path                    | README.md     |
| motto           | string \| boolean | whether add powered by footer              | 'false'        |
| title           | string            | main markdown h1 title                     | repo.name     |
| includeFork     | string \| boolean | include forked repos                       | 'false'        |
| includeArchived | string \| boolean | include archived repos                     | 'false'        |
| onlyPrivate     | string \| boolean | only include private repos                 | 'false'       |

---
_Source: https://npm.io/package/github-repository-distributor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
