Skip to content

Commit 6443440

Browse files
committed
Improve GitHub sync plugin
1 parent 9bef814 commit 6443440

2 files changed

Lines changed: 288 additions & 271 deletions

File tree

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,24 @@ Displays a list of open pull requests from a GitHub repository.
5656

5757
### Important Notes
5858

59-
- 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.
59+
- For public repositories, the shortcodes work without a token. Add a GitHub personal access token if you need better rate limits or private repo access.
6060

6161
- Replace `YourGitHubToken`, `YourRepository`, and `OwnerOfRepo` with the appropriate values for your GitHub repository.
6262

63-
- Ensure that cURL is enabled on your server to make API requests to GitHub.
63+
- The plugin uses the WordPress HTTP API, so cURL-specific setup is no longer required.
6464

65-
- Add your own User-Agent in the code (where specified) to comply with GitHub API guidelines.
65+
- The plugin now sends a WordPress-safe User-Agent automatically.
6666

6767
- Insert the desired shortcode into your WordPress post, page, or widget to display GitHub repository information on your website.
6868

6969
Enjoy displaying GitHub repository data on your WordPress site using these simple and efficient shortcodes!
70+
71+
## Change Log
72+
73+
### v1.1
74+
75+
- Replaced raw cURL requests with the WordPress HTTP API.
76+
- Added input validation for repository owner and name.
77+
- Added short-term caching with transients to reduce GitHub API calls.
78+
- Improved escaping and added `rel="noopener noreferrer"` to external links.
79+
- Made commit, issue, and pull request rendering more tolerant of missing GitHub fields.

0 commit comments

Comments
 (0)