Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ntsd/github-profile-repositories
Automatically create repositories list for your Github Profile.
https://github.com/ntsd/github-profile-repositories
github github-actions github-api github-profile hacktoberfest
Last synced: about 1 month ago
JSON representation
Automatically create repositories list for your Github Profile.
- Host: GitHub
- URL: https://github.com/ntsd/github-profile-repositories
- Owner: ntsd
- License: mit
- Created: 2021-11-22T17:59:47.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T02:09:45.000Z (about 2 years ago)
- Last Synced: 2024-10-31T10:45:16.526Z (about 2 months ago)
- Topics: github, github-actions, github-api, github-profile, hacktoberfest
- Language: TypeScript
- Homepage: https://github.com/marketplace/actions/github-profile-repositories
- Size: 1010 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Github Profile Repositories
Name: `github-profile-repositories`
Automatically create repositories list for your Github Profile.
## Template file
This action required a template file which it's required input `template-file`. The template file will render by [LiquidJS](https://liquidjs.com/).
You can find the example template file [here](https://github.com/ntsd/github-profile-repositories/blob/master/example/TEMPLATE.md).
The template file will render to required input `render-file`.### Template Parameters
Template parameters will following data from Github GraphQL API. [Repository](https://docs.github.com/en/graphql/reference/objects#repository) and [PullRequest](https://docs.github.com/en/graphql/reference/objects#pullrequest)
#### repositories
```GraphQL
repositories [
{
name
url
stargazerCount
forkCount
isPrivate
description
createdAt
updatedAt
primaryLanguage {
name
color
}
}
]
```#### contributed
```GraphQL
contributed [
{
name
url
stargazerCount
forkCount
isPrivate
description
createdAt
updatedAt
primaryLanguage {
name
color
}
owner {
login
}
contributions [
{
occurredAt
pullRequest {
title
url
createdAt
updatedAt
closed
closedAt
merged
mergedAt
}
}
]
}
]
```## Inputs
`github-token` - This action required Github Token which it's required input. The token will use to query owner repositories and contributions repositories to the [Github GraphQL API](https://docs.github.com/en/graphql). The token required scopes `repo:status`, `public_repo`, and `user:email` to commit the rendered file if need. `required`.
`template-file` - The file template to render. `required`.
`render-file` - The rendered out put file. `required`.
`limit` - The limit number of repositories will render, max 25. `Default 10`.
`repositories-order-by` - The method to sort the repositories list. Support (STARGAZERS|CREATED_AT|UPDATED_AT|PUSHED_AT|NAME). `Default STARGAZERS`.
`contributed-order-by` - The method to sort the contributed repositories list. Support (STARGAZERS|OCCURRED_AT). `Default STARGAZERS`.
## Examples
### Simple
```yml
name: Generate Github Profile
on: pushjobs:
github-profile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Github Profile Repositories
uses: ntsd/github-profile-repositories@master
with:
github-token: "${{ secrets.MY_GITHUB_TOKEN }}"
template-file: "./TEMPLATE.md"
render-file: "./README.md"
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "ntsd"
git commit -am "docs: auto update README.md"
git push
```### Full configs
```yml
name: Generate Github Profile
on: pushjobs:
github-profile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Github Profile Repositories
uses: ntsd/github-profile-repositories@master
with:
github-token: "${{ secrets.MY_GITHUB_TOKEN }}"
template-file: "./TEMPLATE.md"
render-file: "./README.md"
limit: 20
repositories-order-by: "UPDATED_AT"
contributed-order-by: "OCCURRED_AT"
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "ntsd"
git commit -am "docs: auto update README.md"
git push
```## Resources