[Mod] GitHub Integration

Started by Deaks, Today at 11:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Deaks

💀 GitHub Integration 1.1.1
Your GitHub projects, live on your forum.
for SMF 2.1.x · by BoredSkull · ISC licence



GitHub Integration connects public GitHub repositories to your forum. It adds a read-only dashboard, a repository panel on boards and topics, and a board that posts your releases, issues, pull requests and branch pushes automatically. It uses hooks only and makes no core edits. It doesn't need a GitHub account or token, and it never downloads or runs code from GitHub.

🆕 What's new in 1.1.1
  • Commit messages in push topics. Branch push topics now show the head commit message above the GitHub link, with paragraphs kept (up to 4,000 characters).
  • No more duplicate topics. Comments, labels, new PR commits and release-note edits no longer post an item again. Topics are posted for new items, opened/closed changes and title changes only.
  • Safe upgrade. After upgrading, the first refresh of each repository records the topics you already have, so nothing is posted twice.
  • More reliable refreshes. A failed board post is logged and the refresh carries on instead of stopping part-way.
  • Scheduled Tasks. The refresh task now shows its proper name and description.
  • Other fixes: repository URLs ending in .git are saved correctly, HTTP/2 responses are read correctly on servers without cURL, and upgrading from 1.1.0 now updates the language file and template.

📊 Public dashboard
  • Add up to 30 public repositories as owner/repository or a full GitHub URL
  • Latest release with download links for its files, plus open issues and pull requests
  • A repository panel above board topic lists and topic pages, linking each repository and its dashboard
  • Page visits never contact GitHub. Everything is served from saved snapshots.

📢 Board updates
  • Choose a board under Post GitHub updates to board, and new releases, issues and pull requests are posted there as topics
  • The first refresh adds topics for what's on the dashboard now. Later refreshes add new items and changes.
  • With signed webhooks, branch pushes and closed issues or pull requests are posted too
  • Every topic links back to the original item on GitHub

⏱️ Gentle on GitHub
  • A scheduled task refreshes snapshots every 10 minutes, with at most four requests per run
  • If GitHub rate-limits the forum, refreshing pauses for an hour automatically
  • Webhooks only mark snapshots due for refresh and never trigger extra requests

🔐 Webhooks
  • Payload URL: [tt]index.php?action=githubhook[/tt], content type application/json
  • Events: Releases, Issues, Pull requests, Pushes
  • Every delivery is checked with HMAC-SHA256, and only configured repositories are accepted
  • The webhook secret is stored encrypted (AES-256-GCM)
  • Repeat deliveries are recognised and ignored

🔗 Works with the BoredSkull collection
  • Board Downloads can refresh a Traditional mode listing's latest release tag and changelog from a configured repository
  • Other mods can listen for signed GitHub events with [tt]integrate_bsgi_github_event[/tt]

⬆️ Installing and upgrading
  • Upgrade directly from 1.0.1 – 1.1.0 through the Package Manager. Your settings and secret are kept.
  • After installing, check that GitHub snapshot refresh is enabled in Admin › Maintenance › Scheduled Tasks. On quiet forums, a cron job keeps refreshes on time.
  • Settings: Admin › Configuration › Modification Settings › GitHub Integration
  • Requires OpenSSL to store a webhook secret



Buts and Support Requests should not be posted in this topic 💀
  • 0 reactions

    Members who reacted