A WordPress plugin providing a shortcode to embed a list of commits of a gitea project.
Go to file
2023-09-23 16:00:11 +02:00
lang update description and usage instructions (German translation) 2023-09-23 15:31:53 +02:00
.gitignore include .mo file 2021-11-28 00:47:07 +01:00
LICENSE Add LICENSE 2021-11-29 08:51:05 +00:00
linuxfoo-gitea.php correct json pat to commit message 2023-09-23 16:00:11 +02:00
README.md update project documentation 2023-09-23 15:40:13 +02:00
styles.css correct class names 2023-09-23 15:56:40 +02:00

linuxfoo-gitea

Summary

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 gitea-show-project

Examples

Add the following shortcode for a list of at most 5 commits to that project:

[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:

[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:

[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 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:

  • commits="STRING": Optional; if set, STRING can be either all (show a list of recent commits, the default) or none (do not show a list of recent commits).
  • releases=STRING: Optional; if set, STRING can be either all (show a list of all releases of this project, if any) or latest (show a link to the latest release of this project, if any) or none (do not show releases of this project, the default).

The following optional attributes modify the behavior of the list of commits:

  • 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.
  • author="none": Optional; do not print names of authors in the commit list.

Author and License