{"action":"created","comment":{"url":"https://api.github.com/repos/electron/electron/pulls/comments/213100803","pull_request_review_id":149858842,"id":213100803,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzEwMDgwMw==","diff_hunk":"@@ -0,0 +1,104 @@\n+#!/usr/bin/env node\n+\n+if (!process.env.CI) require('dotenv-safe').load()\n+require('colors')\n+const args = require('minimist')(process.argv.slice(2), {\n+  boolean: ['tag']\n+})\n+const { exec, execSync } = require('child_process')\n+const fail = '\\u2717'.red\n+const { GitProcess } = require('dugite')\n+\n+const GitHub = require('github')\n+const pass = '\\u2713'.green\n+const path = require('path')\n+\n+const github = new GitHub()\n+const gitDir = path.resolve(__dirname, '..')\n+\n+github.authenticate({\n+  type: 'token',\n+  token: process.env.ELECTRON_GITHUB_TOKEN\n+})\n+\n+async function getCurrentBranch (gitDir) {\n+  const gitArgs = ['rev-parse', '--abbrev-ref', 'HEAD']\n+  const branchDetails = await GitProcess.exec(gitArgs, gitDir)\n+  if (branchDetails.exitCode === 0) {\n+    return branchDetails.stdout.trim()\n+  } else {\n+    const error = GitProcess.parseError(branchDetails.stderr)\n+    console.log(`${fail} Couldn't get current branch: ${branchDetails.stderr}`, error)\n+    process.exit(1)\n+  }\n+}\n+\n+async function revertBumpCommit (tag) {\n+  const branch = getCurrentBranch()\n+  const hashToRevert = await exec(`git log | grep 'Bump v[0-9.]*' | grep -o '\\\\w\\\\ {8,\\\\}' | head -n 1`)","path":"script/release-artifact-cleanup.js","position":38,"original_position":38,"commit_id":"dae632b8677298a21192ae1a4eab3ff84af1930a","original_commit_id":"dae632b8677298a21192ae1a4eab3ff84af1930a","user":{"login":"ckerr","id":70381,"node_id":"MDQ6VXNlcjcwMzgx","avatar_url":"https://avatars3.githubusercontent.com/u/70381?v=4","gravatar_id":"","url":"https://api.github.com/users/ckerr","html_url":"https://github.com/ckerr","followers_url":"https://api.github.com/users/ckerr/followers","following_url":"https://api.github.com/users/ckerr/following{/other_user}","gists_url":"https://api.github.com/users/ckerr/gists{/gist_id}","starred_url":"https://api.github.com/users/ckerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckerr/subscriptions","organizations_url":"https://api.github.com/users/ckerr/orgs","repos_url":"https://api.github.com/users/ckerr/repos","events_url":"https://api.github.com/users/ckerr/events{/privacy}","received_events_url":"https://api.github.com/users/ckerr/received_events","type":"User","site_admin":true},"body":"We can do this better in git:\r\n\r\n`git log -n1 --grep \"Bump v[0-9.]*\" --format=format:%H`\r\n\r\nAdvantages:\r\n * exits after the first hit, no need to dump + grep through the entire log\r\n * more readable, no having to look at the output of `git --log` to guess what the `{8, \\\\}` means\r\n * could be implemented in a single `git` call, so this could be done in Dugite instead of raw exec\r\n * When implemented in Dugite, we can do better error checking","created_at":"2018-08-27T20:16:42Z","updated_at":"2018-08-27T20:26:25Z","html_url":"https://github.com/electron/electron/pull/14250#discussion_r213100803","pull_request_url":"https://api.github.com/repos/electron/electron/pulls/14250","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/electron/electron/pulls/comments/213100803"},"html":{"href":"https://github.com/electron/electron/pull/14250#discussion_r213100803"},"pull_request":{"href":"https://api.github.com/repos/electron/electron/pulls/14250"}}},"pull_request":{"url":"https://api.github.com/repos/electron/electron/pulls/14250","id":209977442,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5OTc3NDQy","html_url":"https://github.com/electron/electron/pull/14250","diff_url":"https://github.com/electron/electron/pull/14250.diff","patch_url":"https://github.com/electron/electron/pull/14250.patch","issue_url":"https://api.github.com/repos/electron/electron/issues/14250","number":14250,"state":"open","locked":false,"title":"chore: add release-artifact-cleanup script","user":{"login":"codebytere","id":2036040,"node_id":"MDQ6VXNlcjIwMzYwNDA=","avatar_url":"https://avatars2.githubusercontent.com/u/2036040?v=4","gravatar_id":"","url":"https://api.github.com/users/codebytere","html_url":"https://github.com/codebytere","followers_url":"https://api.github.com/users/codebytere/followers","following_url":"https://api.github.com/users/codebytere/following{/other_user}","gists_url":"https://api.github.com/users/codebytere/gists{/gist_id}","starred_url":"https://api.github.com/users/codebytere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codebytere/subscriptions","organizations_url":"https://api.github.com/users/codebytere/orgs","repos_url":"https://api.github.com/users/codebytere/repos","events_url":"https://api.github.com/users/codebytere/events{/privacy}","received_events_url":"https://api.github.com/users/codebytere/received_events","type":"User","site_admin":true},"body":"##### Description of Change\r\n\r\nCloses https://github.com/electron/sudowoodo/issues/53.\r\n\r\nAdds a script to `script/` that does the following:\r\n1) delete tag from nightlies repo\r\n2) delete tag from  `electron/electron`\r\n3) revert bump commit in `electron/electron`\r\n4) Delete draft\r\n\r\n/cc @MarshallOfSound \r\n\r\n##### Checklist\r\n\r\n- [x] PR description included and stakeholders cc'd\r\n- [x] `npm test` passes\r\n- [x] PR title follows semantic [commit guidelines](https://github.com/electron/electron/blob/master/docs/development/pull-requests.md#commit-message-guidelines)\r\n\r\n##### Release Notes\r\n<!-- Used to describe release notes for future release versions. See https://github.com/electron/clerk/blob/master/README.md for details. -->\r\n\r\nNotes: no-notes","created_at":"2018-08-21T22:51:21Z","updated_at":"2018-08-27T20:26:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"557f5f70547c9630c1cf004ce24c4c3aed2a6e29","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/electron/electron/pulls/14250/commits","review_comments_url":"https://api.github.com/repos/electron/electron/pulls/14250/comments","review_comment_url":"https://api.github.com/repos/electron/electron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/electron/electron/issues/14250/comments","statuses_url":"https://api.github.com/repos/electron/electron/statuses/dae632b8677298a21192ae1a4eab3ff84af1930a","head":{"label":"electron:cleanup-release","ref":"cleanup-release","sha":"dae632b8677298a21192ae1a4eab3ff84af1930a","user":{"login":"electron","id":13409222,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDA5MjIy","avatar_url":"https://avatars1.githubusercontent.com/u/13409222?v=4","gravatar_id":"","url":"https://api.github.com/users/electron","html_url":"https://github.com/electron","followers_url":"https://api.github.com/users/electron/followers","following_url":"https://api.github.com/users/electron/following{/other_user}","gists_url":"https://api.github.com/users/electron/gists{/gist_id}","starred_url":"https://api.github.com/users/electron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electron/subscriptions","organizations_url":"https://api.github.com/users/electron/orgs","repos_url":"https://api.github.com/users/electron/repos","events_url":"https://api.github.com/users/electron/events{/privacy}","received_events_url":"https://api.github.com/users/electron/received_events","type":"Organization","site_admin":false},"repo":{"id":9384267,"node_id":"MDEwOlJlcG9zaXRvcnk5Mzg0MjY3","name":"electron","full_name":"electron/electron","owner":{"login":"electron","id":13409222,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDA5MjIy","avatar_url":"https://avatars1.githubusercontent.com/u/13409222?v=4","gravatar_id":"","url":"https://api.github.com/users/electron","html_url":"https://github.com/electron","followers_url":"https://api.github.com/users/electron/followers","following_url":"https://api.github.com/users/electron/following{/other_user}","gists_url":"https://api.github.com/users/electron/gists{/gist_id}","starred_url":"https://api.github.com/users/electron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electron/subscriptions","organizations_url":"https://api.github.com/users/electron/orgs","repos_url":"https://api.github.com/users/electron/repos","events_url":"https://api.github.com/users/electron/events{/privacy}","received_events_url":"https://api.github.com/users/electron/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/electron/electron","description":"Build cross-platform desktop apps with JavaScript, HTML, and CSS","fork":false,"url":"https://api.github.com/repos/electron/electron","forks_url":"https://api.github.com/repos/electron/electron/forks","keys_url":"https://api.github.com/repos/electron/electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/electron/electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/electron/electron/teams","hooks_url":"https://api.github.com/repos/electron/electron/hooks","issue_events_url":"https://api.github.com/repos/electron/electron/issues/events{/number}","events_url":"https://api.github.com/repos/electron/electron/events","assignees_url":"https://api.github.com/repos/electron/electron/assignees{/user}","branches_url":"https://api.github.com/repos/electron/electron/branches{/branch}","tags_url":"https://api.github.com/repos/electron/electron/tags","blobs_url":"https://api.github.com/repos/electron/electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/electron/electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/electron/electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/electron/electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/electron/electron/statuses/{sha}","languages_url":"https://api.github.com/repos/electron/electron/languages","stargazers_url":"https://api.github.com/repos/electron/electron/stargazers","contributors_url":"https://api.github.com/repos/electron/electron/contributors","subscribers_url":"https://api.github.com/repos/electron/electron/subscribers","subscription_url":"https://api.github.com/repos/electron/electron/subscription","commits_url":"https://api.github.com/repos/electron/electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/electron/electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/electron/electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/electron/electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/electron/electron/contents/{+path}","compare_url":"https://api.github.com/repos/electron/electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/electron/electron/merges","archive_url":"https://api.github.com/repos/electron/electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/electron/electron/downloads","issues_url":"https://api.github.com/repos/electron/electron/issues{/number}","pulls_url":"https://api.github.com/repos/electron/electron/pulls{/number}","milestones_url":"https://api.github.com/repos/electron/electron/milestones{/number}","notifications_url":"https://api.github.com/repos/electron/electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/electron/electron/labels{/name}","releases_url":"https://api.github.com/repos/electron/electron/releases{/id}","deployments_url":"https://api.github.com/repos/electron/electron/deployments","created_at":"2013-04-12T01:47:36Z","updated_at":"2018-08-27T20:25:29Z","pushed_at":"2018-08-27T20:22:18Z","git_url":"git://github.com/electron/electron.git","ssh_url":"git@github.com:electron/electron.git","clone_url":"https://github.com/electron/electron.git","svn_url":"https://github.com/electron/electron","homepage":"https://electronjs.org","size":41844,"stargazers_count":63848,"watchers_count":63848,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8318,"mirror_url":null,"archived":false,"open_issues_count":1310,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8318,"open_issues":1310,"watchers":63848,"default_branch":"master"}},"base":{"label":"electron:master","ref":"master","sha":"79eac1fdcb3237fcd14de97c86942972f2c99c5a","user":{"login":"electron","id":13409222,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDA5MjIy","avatar_url":"https://avatars1.githubusercontent.com/u/13409222?v=4","gravatar_id":"","url":"https://api.github.com/users/electron","html_url":"https://github.com/electron","followers_url":"https://api.github.com/users/electron/followers","following_url":"https://api.github.com/users/electron/following{/other_user}","gists_url":"https://api.github.com/users/electron/gists{/gist_id}","starred_url":"https://api.github.com/users/electron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electron/subscriptions","organizations_url":"https://api.github.com/users/electron/orgs","repos_url":"https://api.github.com/users/electron/repos","events_url":"https://api.github.com/users/electron/events{/privacy}","received_events_url":"https://api.github.com/users/electron/received_events","type":"Organization","site_admin":false},"repo":{"id":9384267,"node_id":"MDEwOlJlcG9zaXRvcnk5Mzg0MjY3","name":"electron","full_name":"electron/electron","owner":{"login":"electron","id":13409222,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDA5MjIy","avatar_url":"https://avatars1.githubusercontent.com/u/13409222?v=4","gravatar_id":"","url":"https://api.github.com/users/electron","html_url":"https://github.com/electron","followers_url":"https://api.github.com/users/electron/followers","following_url":"https://api.github.com/users/electron/following{/other_user}","gists_url":"https://api.github.com/users/electron/gists{/gist_id}","starred_url":"https://api.github.com/users/electron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electron/subscriptions","organizations_url":"https://api.github.com/users/electron/orgs","repos_url":"https://api.github.com/users/electron/repos","events_url":"https://api.github.com/users/electron/events{/privacy}","received_events_url":"https://api.github.com/users/electron/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/electron/electron","description":"Build cross-platform desktop apps with JavaScript, HTML, and CSS","fork":false,"url":"https://api.github.com/repos/electron/electron","forks_url":"https://api.github.com/repos/electron/electron/forks","keys_url":"https://api.github.com/repos/electron/electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/electron/electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/electron/electron/teams","hooks_url":"https://api.github.com/repos/electron/electron/hooks","issue_events_url":"https://api.github.com/repos/electron/electron/issues/events{/number}","events_url":"https://api.github.com/repos/electron/electron/events","assignees_url":"https://api.github.com/repos/electron/electron/assignees{/user}","branches_url":"https://api.github.com/repos/electron/electron/branches{/branch}","tags_url":"https://api.github.com/repos/electron/electron/tags","blobs_url":"https://api.github.com/repos/electron/electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/electron/electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/electron/electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/electron/electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/electron/electron/statuses/{sha}","languages_url":"https://api.github.com/repos/electron/electron/languages","stargazers_url":"https://api.github.com/repos/electron/electron/stargazers","contributors_url":"https://api.github.com/repos/electron/electron/contributors","subscribers_url":"https://api.github.com/repos/electron/electron/subscribers","subscription_url":"https://api.github.com/repos/electron/electron/subscription","commits_url":"https://api.github.com/repos/electron/electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/electron/electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/electron/electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/electron/electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/electron/electron/contents/{+path}","compare_url":"https://api.github.com/repos/electron/electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/electron/electron/merges","archive_url":"https://api.github.com/repos/electron/electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/electron/electron/downloads","issues_url":"https://api.github.com/repos/electron/electron/issues{/number}","pulls_url":"https://api.github.com/repos/electron/electron/pulls{/number}","milestones_url":"https://api.github.com/repos/electron/electron/milestones{/number}","notifications_url":"https://api.github.com/repos/electron/electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/electron/electron/labels{/name}","releases_url":"https://api.github.com/repos/electron/electron/releases{/id}","deployments_url":"https://api.github.com/repos/electron/electron/deployments","created_at":"2013-04-12T01:47:36Z","updated_at":"2018-08-27T20:25:29Z","pushed_at":"2018-08-27T20:22:18Z","git_url":"git://github.com/electron/electron.git","ssh_url":"git@github.com:electron/electron.git","clone_url":"https://github.com/electron/electron.git","svn_url":"https://github.com/electron/electron","homepage":"https://electronjs.org","size":41844,"stargazers_count":63848,"watchers_count":63848,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8318,"mirror_url":null,"archived":false,"open_issues_count":1310,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8318,"open_issues":1310,"watchers":63848,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/electron/electron/pulls/14250"},"html":{"href":"https://github.com/electron/electron/pull/14250"},"issue":{"href":"https://api.github.com/repos/electron/electron/issues/14250"},"comments":{"href":"https://api.github.com/repos/electron/electron/issues/14250/comments"},"review_comments":{"href":"https://api.github.com/repos/electron/electron/pulls/14250/comments"},"review_comment":{"href":"https://api.github.com/repos/electron/electron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/electron/electron/pulls/14250/commits"},"statuses":{"href":"https://api.github.com/repos/electron/electron/statuses/dae632b8677298a21192ae1a4eab3ff84af1930a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ckerr"}}