Skip to content

Commit 965e74d

Browse files
authored
Readme.md
Documentation on how to use the shortcodes as needed.
1 parent 126f4b7 commit 965e74d

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
## GitHub Sync Wordpress Shortcodes
2+
3+
These shortcodes allow you to display information from a GitHub repository on your WordPress website. You can easily show open issues, new commits, and open pull requests using these shortcodes.
4+
5+
### 1. `[gitsync_issues]`
6+
7+
Displays a list of open issues from a GitHub repository.
8+
9+
#### Attributes
10+
11+
- `Token`: Your GitHub personal access token. This is required for authentication and API access.
12+
- `repository`: The name of the GitHub repository.
13+
- `owner`: The owner or organization of the GitHub repository.
14+
15+
#### Usage
16+
17+
```shortcode
18+
[gitsync_issues token="YourGitHubToken" repository="YourRepository" owner="YourOwner"]
19+
```
20+
21+
### 2. `[gitsync_commits]`
22+
23+
Displays a list of the latest commits from a GitHub repository.
24+
25+
#### Attributes
26+
27+
- `Token`: Your GitHub personal access token. This is required for authentication and API access.
28+
- `repository`: The name of the GitHub repository.
29+
- `owner`: The owner or organization of the GitHub repository.
30+
31+
#### Usage
32+
33+
```shortcode
34+
[gitsync_commits token="YourGitHubToken" repository="YourRepository" owner="YourOwner"]
35+
```
36+
37+
### 3. `[gitsync_pull_requests]`
38+
39+
Displays a list of open pull requests from a GitHub repository.
40+
41+
#### Attributes
42+
43+
- `Token`: Your GitHub personal access token. This is required for authentication and API access.
44+
- `repository`: The name of the GitHub repository.
45+
- `owner`: The owner or organization of the GitHub repository.
46+
47+
#### Usage
48+
49+
```shortcode
50+
[gitsync_pull_requests token="YourGitHubToken" repository="YourRepository" owner="YourOwner"]
51+
```
52+
53+
### Important Notes
54+
55+
- Before using these shortcodes, make sure you have a valid GitHub personal access token. You can create a token with appropriate permissions in your GitHub account settings.
56+
57+
- Replace `YourGitHubToken`, `YourRepository`, and `YourOwner` with the appropriate values for your GitHub repository.
58+
59+
- Ensure that cURL is enabled on your server to make API requests to GitHub.
60+
61+
- Add your own User-Agent in the code (where specified) to comply with GitHub API guidelines.
62+
63+
- Insert the desired shortcode into your WordPress post, page, or widget to display GitHub repository information on your website.
64+
65+
Enjoy displaying GitHub repository data on your WordPress site using these simple and efficient shortcodes!

0 commit comments

Comments
 (0)