• Welcome to Simple Machines Community Forum. Please login or sign up.

Converted to GitHub

Started by Antes, September 20, 2021, 11:16:14 AM

Previous topic - Next topic

Antes

so yolo to something ... I did https://custom.simplemachines.org/index.php?theme=2919

Code (Headers) Select
Request URL: https://custom.simplemachines.org/index.php?action=webhook&sa=github&theme=2919
Request method: POST
Accept: */*
content-type: application/x-www-form-urlencoded
User-Agent: GitHub-Hookshot/915fca4
X-GitHub-Delivery: 058ffafc-1a25-11ec-9935-0dd3ec13fa96
X-GitHub-Event: push
X-GitHub-Hook-ID: 319185666
X-GitHub-Hook-Installation-Target-ID: 28350379
X-GitHub-Hook-Installation-Target-Type: repository
X-Hub-Signature: sha1=eb788bacd18a3920135040610dace92d739706b2
X-Hub-Signature-256: sha256=8199be50b1abe7ad5fab6a83d36013474e3b7ca66551b3e9e4debee7828afca9
Code (Payload) Select
{
  "ref": "refs/tags/v0.7.3.1",
  "before": "0000000000000000000000000000000000000000",
  "after": "9718a7ad7ac1d3e317b781c51b6cf2da28fbe684",
  "repository": {
    "id": 28350379,
    "node_id": "MDEwOlJlcG9zaXRvcnkyODM1MDM3OQ==",
    "name": "Lunarfall",
    "full_name": "XinYenFon/Lunarfall",
    "private": false,
    "owner": {
      "name": "XinYenFon",
      "email": "1669995+XinYenFon@users.noreply.github.com",
      "login": "XinYenFon",
      "id": 1669995,
      "node_id": "MDQ6VXNlcjE2Njk5OTU=",
      "avatar_url": "https://avatars.githubusercontent.com/u/1669995?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/XinYenFon",
      "html_url": "https://github.com/XinYenFon",
      "followers_url": "https://api.github.com/users/XinYenFon/followers",
      "following_url": "https://api.github.com/users/XinYenFon/following{/other_user}",
      "gists_url": "https://api.github.com/users/XinYenFon/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/XinYenFon/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/XinYenFon/subscriptions",
      "organizations_url": "https://api.github.com/users/XinYenFon/orgs",
      "repos_url": "https://api.github.com/users/XinYenFon/repos",
      "events_url": "https://api.github.com/users/XinYenFon/events{/privacy}",
      "received_events_url": "https://api.github.com/users/XinYenFon/received_events",
      "type": "User",
      "site_admin": false
    },
    "html_url": "https://github.com/XinYenFon/Lunarfall",
    "description": "Transparent Gaming theme for SMF 2.1",
    "fork": false,
    "url": "https://github.com/XinYenFon/Lunarfall",
    "forks_url": "https://api.github.com/repos/XinYenFon/Lunarfall/forks",
    "keys_url": "https://api.github.com/repos/XinYenFon/Lunarfall/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/XinYenFon/Lunarfall/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/XinYenFon/Lunarfall/teams",
    "hooks_url": "https://api.github.com/repos/XinYenFon/Lunarfall/hooks",
    "issue_events_url": "https://api.github.com/repos/XinYenFon/Lunarfall/issues/events{/number}",
    "events_url": "https://api.github.com/repos/XinYenFon/Lunarfall/events",
    "assignees_url": "https://api.github.com/repos/XinYenFon/Lunarfall/assignees{/user}",
    "branches_url": "https://api.github.com/repos/XinYenFon/Lunarfall/branches{/branch}",
    "tags_url": "https://api.github.com/repos/XinYenFon/Lunarfall/tags",
    "blobs_url": "https://api.github.com/repos/XinYenFon/Lunarfall/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/XinYenFon/Lunarfall/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/XinYenFon/Lunarfall/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/XinYenFon/Lunarfall/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/XinYenFon/Lunarfall/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/XinYenFon/Lunarfall/languages",
    "stargazers_url": "https://api.github.com/repos/XinYenFon/Lunarfall/stargazers",
    "contributors_url": "https://api.github.com/repos/XinYenFon/Lunarfall/contributors",
    "subscribers_url": "https://api.github.com/repos/XinYenFon/Lunarfall/subscribers",
    "subscription_url": "https://api.github.com/repos/XinYenFon/Lunarfall/subscription",
    "commits_url": "https://api.github.com/repos/XinYenFon/Lunarfall/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/XinYenFon/Lunarfall/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/XinYenFon/Lunarfall/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/XinYenFon/Lunarfall/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/XinYenFon/Lunarfall/contents/{+path}",
    "compare_url": "https://api.github.com/repos/XinYenFon/Lunarfall/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/XinYenFon/Lunarfall/merges",
    "archive_url": "https://api.github.com/repos/XinYenFon/Lunarfall/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/XinYenFon/Lunarfall/downloads",
    "issues_url": "https://api.github.com/repos/XinYenFon/Lunarfall/issues{/number}",
    "pulls_url": "https://api.github.com/repos/XinYenFon/Lunarfall/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/XinYenFon/Lunarfall/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/XinYenFon/Lunarfall/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/XinYenFon/Lunarfall/labels{/name}",
    "releases_url": "https://api.github.com/repos/XinYenFon/Lunarfall/releases{/id}",
    "deployments_url": "https://api.github.com/repos/XinYenFon/Lunarfall/deployments",
    "created_at": 1419269936,
    "updated_at": "2021-09-20T14:10:53Z",
    "pushed_at": 1632150684,
    "git_url": "git://github.com/XinYenFon/Lunarfall.git",
    "ssh_url": "git@github.com:XinYenFon/Lunarfall.git",
    "clone_url": "https://github.com/XinYenFon/Lunarfall.git",
    "svn_url": "https://github.com/XinYenFon/Lunarfall",
    "homepage": "",
    "size": 8975,
    "stargazers_count": 6,
    "watchers_count": 6,
    "language": "PHP",
    "has_issues": true,
    "has_projects": false,
    "has_downloads": true,
    "has_wiki": true,
    "has_pages": false,
    "forks_count": 4,
    "mirror_url": null,
    "archived": false,
    "disabled": false,
    "open_issues_count": 0,
    "license": {
      "key": "mit",
      "name": "MIT License",
      "spdx_id": "MIT",
      "url": "https://api.github.com/licenses/mit",
      "node_id": "MDc6TGljZW5zZTEz"
    },
    "allow_forking": true,
    "forks": 4,
    "open_issues": 0,
    "watchers": 6,
    "default_branch": "master",
    "stargazers": 6,
    "master_branch": "master"
  },
  "pusher": {
    "name": "XinYenFon",
    "email": "1669995+XinYenFon@users.noreply.github.com"
  },
  "sender": {
    "login": "XinYenFon",
    "id": 1669995,
    "node_id": "MDQ6VXNlcjE2Njk5OTU=",
    "avatar_url": "https://avatars.githubusercontent.com/u/1669995?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/XinYenFon",
    "html_url": "https://github.com/XinYenFon",
    "followers_url": "https://api.github.com/users/XinYenFon/followers",
    "following_url": "https://api.github.com/users/XinYenFon/following{/other_user}",
    "gists_url": "https://api.github.com/users/XinYenFon/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/XinYenFon/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/XinYenFon/subscriptions",
    "organizations_url": "https://api.github.com/users/XinYenFon/orgs",
    "repos_url": "https://api.github.com/users/XinYenFon/repos",
    "events_url": "https://api.github.com/users/XinYenFon/events{/privacy}",
    "received_events_url": "https://api.github.com/users/XinYenFon/received_events",
    "type": "User",
    "site_admin": false
  },
  "created": true,
  "deleted": false,
  "forced": false,
  "base_ref": "refs/heads/master",
  "compare": "https://github.com/XinYenFon/Lunarfall/compare/v0.7.3.1",
  "commits": [

  ],
  "head_commit": {
    "id": "9718a7ad7ac1d3e317b781c51b6cf2da28fbe684",
    "tree_id": "e19fcd7b281f8fb890d3dd6a3464913649e6c576",
    "distinct": true,
    "message": "RC4 Ready",
    "timestamp": "2021-09-20T17:10:35+03:00",
    "url": "https://github.com/XinYenFon/Lunarfall/commit/9718a7ad7ac1d3e317b781c51b6cf2da28fbe684",
    "author": {
      "name": "XinYenFon",
      "email": "antes@simplemachines.org",
      "username": "XinYenFon"
    },
    "committer": {
      "name": "XinYenFon",
      "email": "antes@simplemachines.org",
      "username": "XinYenFon"
    },
    "added": [

    ],
    "removed": [

    ],
    "modified": [
      "README.md",
      "changelog.txt"
    ]
  }
}

Response 202
Code (Header) Select
Access-Control-Allow-Origin: *
Cache-Control: private
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Date: Mon, 20 Sep 2021 15:11:25 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: nginx
Set-Cookie: P=cpemhk9tq3h7rf84mgs13h2oed; path=/; domain=.simplemachines.org
X-Content-Security-Policy: allow 'self' http://*.googlesyndication.com https://*.googlesyndication.com; options inline-script eval-script; img-src *; script-src 'self' http://*.simplemachines.org http://*.simplemachinesweb.com http://*.googlesyndication.com http://*.doubleclick.net https://*.simplemachines.org https://*.simplemachinesweb.com https://*.googlesyndication.com https://*.doubleclick.net; style-src 'self' http://*.simplemachines.org http://*.simplemachinesweb.com https://*.simplemachines.org https://*.simplemachinesweb.com; frame-ancestors none;
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Xss-Protection: 1

Body - Empty

Diego Andrés

There's no "guide" or "faq" yet but I can provide some info from shawn who kindly wrote this

Quote from: shawnb61 on August 29, 2021, 04:27:53 PMGitHub Integration
There is one difference between a GitHub mod/theme and one hosted by SMF: the location of the mod/theme packages themselves.  When using the GitHub integration on our Customization site, mods and themes go thru the exact same review & approval process as regular mods and themes.  They have all the same requirements.  The difference is that when you click on a link to download a package, it is downloaded directly from GitHub rather than from the SMF site.

Requirements
- You must create and tag a release on your repo.  When creating the release, you must attach your mod or theme as a binary asset to the release.
- The GitHub repo must be public. 
- There is only one mod or theme per repo.
- When specifying the repo, specify the url to the repo... (E.g., not the url to the mod or theme...)
- When specifying the repo, no trailing slashes, e.g., https://github.com/owner/repo
- All normal mod/theme rules apply: xml file required, license required, package id must be unique, etc.

Images may be specified & will be stored locally within SMF as usual.  It is only the packages that are stored at and retrieved from GitHub.

(Note that GitHub has a "package" offering that has a completely different meaning...  We are just attaching our mods/themes to GitHub releases for download; we are not creating "GitHub packages"...)

Converting an Existing Mod to GitHub
If you edit an existing mod or theme, you will see a function to "Convert to a GitHub Repo".  This will change the source of your packages from the SMF site to GitHub, and further will delete all of the packages from SMF. There is no halfway point: you are downloading the packages either from SMF or from GitHub...

This applies to all versions of your mod or theme, so be careful.  If you have 10 historical versions on SMF, and you added the latest one to GitHub, and convert to GitHub, there will only be one version available going forward - the one on GitHub.  So before converting a mod or theme to GitHub, ensure all versions you wish to keep are up on GitHub...


And yes, we are aware downloads counter will break after converting, but they are "not gone" just needs to be fixed at some point.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Antes

so correct me if I'm wrong, when i converted my Theme to GitHub repo one... it still needed an approval from Team or ? there is a time between sync? Since I created v0.7.3 like 5 hours ago and v0.7.3.2 (test release) 2 mins ago but both showing right now (5 mins or so passed)...

the download numbers is just w/e to me :)

live627

I'm still upset about my downloads number.

Diego Andrés

Quote from: Antes on September 20, 2021, 03:26:47 PMso correct me if I'm wrong, when i converted my Theme to GitHub repo one... it still needed an approval from Team or ?

No that's just in general, e.g. submitting a new theme/mod hosted in github, it's just information for newbies too.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: