forked from tk-sls.de/linuxfoo-gitlab
update project documentation
This commit is contained in:
parent
b0313b3f7c
commit
a820f609be
22
README.md
22
README.md
@ -1,37 +1,38 @@
|
||||
# linuxfoo-gitlab
|
||||
# linuxfoo-gitea
|
||||
|
||||
## Summary
|
||||
|
||||
Embed a list of the most recent commits to a Gitlab project. Information is retrieved from a specified Gitlab instance's public REST API.
|
||||
Embed a list of the most recent commits to a Gitea project. Information is retrieved from a specified Gitea instance's public REST API.
|
||||
|
||||
## Shortcode `gitlab-show-project`
|
||||
## Shortcode `gitea-show-project`
|
||||
|
||||
### Examples
|
||||
|
||||
Add the following shortcode for a list of at most 5 commits to that project that were made since at most 3 months ago:
|
||||
Add the following shortcode for a list of at most 5 commits to that project:
|
||||
|
||||
```
|
||||
[gitlab-show-project url="https://tk-sls.de/gitlab" project_id=42 since="3 months" max=5]
|
||||
[gitea-show-project url="https://tk-sls.de/git" project_owner=tk-sls.de project_repo=linuxfoo-gitea max=5]
|
||||
```
|
||||
|
||||
Add the following shortcode for a list of at most 3 commits followed by a link to the latest release:
|
||||
|
||||
```
|
||||
[gitlab-show-project url="https://tk-sls.de/gitlab" project_id=42 max=3 releases="latest"]
|
||||
[gitea-show-project url="https://tk-sls.de/git" project_owner=tk-sls.de project_repo=linuxfoo-gitea max=3 releases="latest"]
|
||||
```
|
||||
|
||||
Add the following shortcode to just link to the Gitlab project, without a list of commits or releases:
|
||||
|
||||
```
|
||||
[gitlab-show-project url="https://tk-sls.de/gitlab" project_id=42 commit="none" releases="none"]
|
||||
[gitea-show-project url="https://tk-sls.de/git" project_owner=tk-sls.de project_repo=linuxfoo-gitea commit="none" releases="none"]
|
||||
```
|
||||
|
||||
### Attributes
|
||||
|
||||
The following attributes are mandatory:
|
||||
|
||||
* `url="STRING"`: Base URL of Gitlab instance (example: `https://tk-sls.de/gitlab`).
|
||||
* `project_id=NUM`: ; `NUM`: Positive Integer, valid project ID in Gitlab specified by `url` (example: `42`).
|
||||
* `url="STRING"`: Base URL of Git instance (example: `https://tk-sls.de/git`).
|
||||
* `project_owner=STRING`: ; `STRING`: User or organisation owning the repository in Gitea (examples: `tilman`, `tk-sls.de`).
|
||||
* `project_repo=STRING`: ; `STRING`: Name of repository in Gitea (examples: `tilman`, `tk-sls.de`).
|
||||
|
||||
The following optional attributes enable or disable additional project information:
|
||||
|
||||
@ -40,7 +41,6 @@ The following optional attributes enable or disable additional project informati
|
||||
|
||||
The following optional attributes modify the behavior of the list of commits:
|
||||
|
||||
* `since="NUM UNIT"`: Optional; `NUM`: Positive integer; `UNIT`: `days`, `months`, `years`; exclude commits older than specified time interval (example: `3 months`).
|
||||
* `max=NUM`: Optional; `NUM`: Positive integer; list not more than `NUM` commits (example: `5`).
|
||||
* `ref_name=STRING`: Optional: list only commit from branch or reference name `STRING` (examples: `main`, `v1.1`).
|
||||
* `default_branch`: Optional; if set, list only commits from the project's default branch.
|
||||
@ -48,5 +48,5 @@ The following optional attributes modify the behavior of the list of commits:
|
||||
|
||||
## Author and License
|
||||
|
||||
* Copyleft 2021 Tilman Kranz <[t.kranz@tk-sls.de](mailto:t.kranz@tk-sls.de)>
|
||||
* Copyleft 2023 Tilman Kranz <[t.kranz@tk-sls.de](mailto:t.kranz@tk-sls.de)>
|
||||
* License: MIT License [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT)
|
||||
|
Loading…
Reference in New Issue
Block a user