{"id":417,"date":"2018-08-24T23:57:45","date_gmt":"2018-08-24T23:57:45","guid":{"rendered":"https:\/\/kevingoedecke.com\/?p=417"},"modified":"2018-08-24T23:57:45","modified_gmt":"2018-08-24T23:57:45","slug":"update-packagist-with-github-webhooks-without-service","status":"publish","type":"post","link":"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/","title":{"rendered":"Update Packagist with GitHub webhooks without Service"},"content":{"rendered":"<p>In April this year GitHub announced that it would <a href=\"https:\/\/developer.github.com\/changes\/2018-04-25-github-services-deprecation\/\" target=\"_blank\" rel=\"noopener\">deprecate the GitHub Service feature<\/a>, which currently is the recommended way to setup a Packagist package with GitHub. Don&#8217;t worry, you still have plenty of time&#8230; GitHub is not going to discontinue this feature till the beginning of 2019, but if you&#8217;re currently setting up GitHub with packagist, then you might want to do it already the new way.<\/p>\n<p>The official Packagist documentation lacks instructions on how to setup automatic updating of Packagist using GitHub WebHooks. Here&#8217;s how you do it:<\/p>\n<p>1. Go to your GitHub repository and select\u00a0<span class=\"lang:default decode:true  crayon-inline \">Settings<\/span>\u00a0-&gt; <span class=\"lang:default decode:true  crayon-inline \">WebHooks<\/span><\/p>\n<p>2. As the PayLoad URL type in<\/p>\n<pre class=\"lang:default decode:true\">https:\/\/packagist.org\/api\/update-package?username=kgoedecke&amp;apiToken=XYZ<\/pre>\n<p>Replace XYZ with your API Token, see your Packagist profile for your API token.<\/p>\n<p>3. Content-Type needs to be <span class=\"lang:default decode:true  crayon-inline \">application\/json<\/span><\/p>\n<p>4. Insert the following into secret, this is the actual JSON payload:<\/p>\n<pre class=\"lang:default decode:true\">json {\"repository\":{\"url\":\"PACKAGIST_PACKAGE_URL\"}}<\/pre>\n<p>Don&#8217;t forget to replace <span class=\"lang:default decode:true  crayon-inline \">PACKAGIST_PACKAGE_URL<\/span>\u00a0 with the URL of your package e.g. <span class=\"lang:default decode:true  crayon-inline\">https:\/\/packagist.org\/packages\/user\/some-package<\/span><\/p>\n<p>5.Now you can select which events should trigger the actual push to Packagist.<\/p>\n<p>6. You&#8217;re done, this is how it should look like:<br \/>\n<a href=\"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/github-webhooks-packagist.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-418\" src=\"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/github-webhooks-packagist-1024x801.jpg\" alt=\"\" width=\"1024\" height=\"801\" srcset=\"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/github-webhooks-packagist-1024x801.jpg 1024w, https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/github-webhooks-packagist-300x235.jpg 300w, https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/github-webhooks-packagist-768x601.jpg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In April this year GitHub announced that it would deprecate the GitHub Service feature, which currently is the recommended way to setup a Packagist package with GitHub. Don&#8217;t worry, you still have plenty of time&#8230; GitHub is not going to discontinue this feature till the beginning of 2019, but if you&#8217;re currently setting up GitHub [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":422,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-417","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Update Packagist with GitHub webhooks without Service - Kevin Goedecke<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Update Packagist with GitHub webhooks without Service - Kevin Goedecke\" \/>\n<meta property=\"og:description\" content=\"In April this year GitHub announced that it would deprecate the GitHub Service feature, which currently is the recommended way to setup a Packagist package with GitHub. Don&#8217;t worry, you still have plenty of time&#8230; GitHub is not going to discontinue this feature till the beginning of 2019, but if you&#8217;re currently setting up GitHub [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/\" \/>\n<meta property=\"og:site_name\" content=\"Kevin Goedecke\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-24T23:57:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/packagist-github-webhooks@2x-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"900\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Kevin Goedecke\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kevin Goedecke\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/\",\"url\":\"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/\",\"name\":\"Update Packagist with GitHub webhooks without Service - Kevin Goedecke\",\"isPartOf\":{\"@id\":\"https:\/\/kevingoedecke.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/packagist-github-webhooks@2x-1.png\",\"datePublished\":\"2018-08-24T23:57:45+00:00\",\"author\":{\"@id\":\"https:\/\/kevingoedecke.com\/#\/schema\/person\/4b156cd6453e1af4bab9076b0a663871\"},\"breadcrumb\":{\"@id\":\"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/#primaryimage\",\"url\":\"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/packagist-github-webhooks@2x-1.png\",\"contentUrl\":\"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/packagist-github-webhooks@2x-1.png\",\"width\":1800,\"height\":900},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/kevingoedecke.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update Packagist with GitHub webhooks without Service\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kevingoedecke.com\/#website\",\"url\":\"https:\/\/kevingoedecke.com\/\",\"name\":\"Kevin Goedecke\",\"description\":\"Founder. Entrepreneur.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kevingoedecke.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/kevingoedecke.com\/#\/schema\/person\/4b156cd6453e1af4bab9076b0a663871\",\"name\":\"Kevin Goedecke\",\"url\":\"https:\/\/kevingoedecke.com\/blog\/author\/kgoedecke\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Update Packagist with GitHub webhooks without Service - Kevin Goedecke","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/","og_locale":"en_US","og_type":"article","og_title":"Update Packagist with GitHub webhooks without Service - Kevin Goedecke","og_description":"In April this year GitHub announced that it would deprecate the GitHub Service feature, which currently is the recommended way to setup a Packagist package with GitHub. Don&#8217;t worry, you still have plenty of time&#8230; GitHub is not going to discontinue this feature till the beginning of 2019, but if you&#8217;re currently setting up GitHub [&hellip;]","og_url":"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/","og_site_name":"Kevin Goedecke","article_published_time":"2018-08-24T23:57:45+00:00","og_image":[{"width":1800,"height":900,"url":"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/packagist-github-webhooks@2x-1.png","type":"image\/png"}],"author":"Kevin Goedecke","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kevin Goedecke","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/","url":"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/","name":"Update Packagist with GitHub webhooks without Service - Kevin Goedecke","isPartOf":{"@id":"https:\/\/kevingoedecke.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/#primaryimage"},"image":{"@id":"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/#primaryimage"},"thumbnailUrl":"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/packagist-github-webhooks@2x-1.png","datePublished":"2018-08-24T23:57:45+00:00","author":{"@id":"https:\/\/kevingoedecke.com\/#\/schema\/person\/4b156cd6453e1af4bab9076b0a663871"},"breadcrumb":{"@id":"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/#primaryimage","url":"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/packagist-github-webhooks@2x-1.png","contentUrl":"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/packagist-github-webhooks@2x-1.png","width":1800,"height":900},{"@type":"BreadcrumbList","@id":"https:\/\/kevingoedecke.com\/blog\/2018\/08\/24\/update-packagist-with-github-webhooks-without-service\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kevingoedecke.com\/"},{"@type":"ListItem","position":2,"name":"Update Packagist with GitHub webhooks without Service"}]},{"@type":"WebSite","@id":"https:\/\/kevingoedecke.com\/#website","url":"https:\/\/kevingoedecke.com\/","name":"Kevin Goedecke","description":"Founder. Entrepreneur.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kevingoedecke.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/kevingoedecke.com\/#\/schema\/person\/4b156cd6453e1af4bab9076b0a663871","name":"Kevin Goedecke","url":"https:\/\/kevingoedecke.com\/blog\/author\/kgoedecke\/"}]}},"jetpack_featured_media_url":"https:\/\/kevingoedecke.com\/blog\/wp-content\/uploads\/2018\/08\/packagist-github-webhooks@2x-1.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kevingoedecke.com\/blog\/wp-json\/wp\/v2\/posts\/417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kevingoedecke.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kevingoedecke.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kevingoedecke.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kevingoedecke.com\/blog\/wp-json\/wp\/v2\/comments?post=417"}],"version-history":[{"count":4,"href":"https:\/\/kevingoedecke.com\/blog\/wp-json\/wp\/v2\/posts\/417\/revisions"}],"predecessor-version":[{"id":423,"href":"https:\/\/kevingoedecke.com\/blog\/wp-json\/wp\/v2\/posts\/417\/revisions\/423"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kevingoedecke.com\/blog\/wp-json\/wp\/v2\/media\/422"}],"wp:attachment":[{"href":"https:\/\/kevingoedecke.com\/blog\/wp-json\/wp\/v2\/media?parent=417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kevingoedecke.com\/blog\/wp-json\/wp\/v2\/categories?post=417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kevingoedecke.com\/blog\/wp-json\/wp\/v2\/tags?post=417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}