enhancement
avatar mbabker
mbabker
2 Jul 2015

When issues are closed by a commit, the status should be set to "Fixed in Code Base" instead of the general "Closed" status.

This is gonna mean figuring out if the issue/pull webhook payloads send some kind of data to flag this. Otherwise we're going to have to get creative.

avatar mbabker mbabker - open - 2 Jul 2015
avatar b2z
b2z - comment - 9 Jul 2015

Just made a test. Here is the payload data. Seems that nothing there :(

b2z/jissues-test#1

{
  "action": "closed",
  "issue": {
    "url": "https://api.github.com/repos/b2z/jissues-test/issues/1",
    "labels_url": "https://api.github.com/repos/b2z/jissues-test/issues/1/labels{/name}",
    "comments_url": "https://api.github.com/repos/b2z/jissues-test/issues/1/comments",
    "events_url": "https://api.github.com/repos/b2z/jissues-test/issues/1/events",
    "html_url": "https://github.com/b2z/jissues-test/issues/1",
    "id": 77045846,
    "number": 1,
    "title": "Issue 1",
    "user": {
      "login": "b2z",
      "id": 3051676,
      "avatar_url": "https://avatars.githubusercontent.com/u/3051676?v=3",
      "gravatar_id": "",
      "url": "https://api.github.com/users/b2z",
      "html_url": "https://github.com/b2z",
      "followers_url": "https://api.github.com/users/b2z/followers",
      "following_url": "https://api.github.com/users/b2z/following{/other_user}",
      "gists_url": "https://api.github.com/users/b2z/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/b2z/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/b2z/subscriptions",
      "organizations_url": "https://api.github.com/users/b2z/orgs",
      "repos_url": "https://api.github.com/users/b2z/repos",
      "events_url": "https://api.github.com/users/b2z/events{/privacy}",
      "received_events_url": "https://api.github.com/users/b2z/received_events",
      "type": "User",
      "site_admin": false
    },
    "labels": [
      {
        "url": "https://api.github.com/repos/b2z/jissues-test/labels/enhancement",
        "name": "enhancement",
        "color": "84b6eb"
      },
      {
        "url": "https://api.github.com/repos/b2z/jissues-test/labels/PR-master",
        "name": "PR-master",
        "color": "ededed"
      }
    ],
    "state": "closed",
    "locked": false,
    "assignee": null,
    "milestone": {
      "url": "https://api.github.com/repos/b2z/jissues-test/milestones/3",
      "html_url": "https://github.com/b2z/jissues-test/milestones/Milestone%203",
      "labels_url": "https://api.github.com/repos/b2z/jissues-test/milestones/3/labels",
      "id": 1113325,
      "number": 3,
      "title": "Milestone 3",
      "description": "One more milestone",
      "creator": {
        "login": "b2z",
        "id": 3051676,
        "avatar_url": "https://avatars.githubusercontent.com/u/3051676?v=3",
        "gravatar_id": "",
        "url": "https://api.github.com/users/b2z",
        "html_url": "https://github.com/b2z",
        "followers_url": "https://api.github.com/users/b2z/followers",
        "following_url": "https://api.github.com/users/b2z/following{/other_user}",
        "gists_url": "https://api.github.com/users/b2z/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/b2z/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/b2z/subscriptions",
        "organizations_url": "https://api.github.com/users/b2z/orgs",
        "repos_url": "https://api.github.com/users/b2z/repos",
        "events_url": "https://api.github.com/users/b2z/events{/privacy}",
        "received_events_url": "https://api.github.com/users/b2z/received_events",
        "type": "User",
        "site_admin": false
      },
      "open_issues": 2,
      "closed_issues": 1,
      "state": "open",
      "created_at": "2015-05-16T14:00:29Z",
      "updated_at": "2015-07-09T18:16:42Z",
      "due_on": null,
      "closed_at": null
    },
    "comments": 2,
    "created_at": "2015-05-16T14:02:53Z",
    "updated_at": "2015-07-09T18:16:42Z",
    "closed_at": "2015-07-09T18:16:42Z",
    "body": "Issue 1"
  },
  "repository": {
    "id": 35725598,
    "name": "jissues-test",
    "full_name": "b2z/jissues-test",
    "owner": {
      "login": "b2z",
      "id": 3051676,
      "avatar_url": "https://avatars.githubusercontent.com/u/3051676?v=3",
      "gravatar_id": "",
      "url": "https://api.github.com/users/b2z",
      "html_url": "https://github.com/b2z",
      "followers_url": "https://api.github.com/users/b2z/followers",
      "following_url": "https://api.github.com/users/b2z/following{/other_user}",
      "gists_url": "https://api.github.com/users/b2z/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/b2z/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/b2z/subscriptions",
      "organizations_url": "https://api.github.com/users/b2z/orgs",
      "repos_url": "https://api.github.com/users/b2z/repos",
      "events_url": "https://api.github.com/users/b2z/events{/privacy}",
      "received_events_url": "https://api.github.com/users/b2z/received_events",
      "type": "User",
      "site_admin": false
    },
    "private": false,
    "html_url": "https://github.com/b2z/jissues-test",
    "description": "Joomla! Issue Tracker Application testing repo",
    "fork": false,
    "url": "https://api.github.com/repos/b2z/jissues-test",
    "forks_url": "https://api.github.com/repos/b2z/jissues-test/forks",
    "keys_url": "https://api.github.com/repos/b2z/jissues-test/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/b2z/jissues-test/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/b2z/jissues-test/teams",
    "hooks_url": "https://api.github.com/repos/b2z/jissues-test/hooks",
    "issue_events_url": "https://api.github.com/repos/b2z/jissues-test/issues/events{/number}",
    "events_url": "https://api.github.com/repos/b2z/jissues-test/events",
    "assignees_url": "https://api.github.com/repos/b2z/jissues-test/assignees{/user}",
    "branches_url": "https://api.github.com/repos/b2z/jissues-test/branches{/branch}",
    "tags_url": "https://api.github.com/repos/b2z/jissues-test/tags",
    "blobs_url": "https://api.github.com/repos/b2z/jissues-test/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/b2z/jissues-test/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/b2z/jissues-test/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/b2z/jissues-test/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/b2z/jissues-test/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/b2z/jissues-test/languages",
    "stargazers_url": "https://api.github.com/repos/b2z/jissues-test/stargazers",
    "contributors_url": "https://api.github.com/repos/b2z/jissues-test/contributors",
    "subscribers_url": "https://api.github.com/repos/b2z/jissues-test/subscribers",
    "subscription_url": "https://api.github.com/repos/b2z/jissues-test/subscription",
    "commits_url": "https://api.github.com/repos/b2z/jissues-test/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/b2z/jissues-test/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/b2z/jissues-test/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/b2z/jissues-test/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/b2z/jissues-test/contents/{+path}",
    "compare_url": "https://api.github.com/repos/b2z/jissues-test/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/b2z/jissues-test/merges",
    "archive_url": "https://api.github.com/repos/b2z/jissues-test/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/b2z/jissues-test/downloads",
    "issues_url": "https://api.github.com/repos/b2z/jissues-test/issues{/number}",
    "pulls_url": "https://api.github.com/repos/b2z/jissues-test/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/b2z/jissues-test/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/b2z/jissues-test/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/b2z/jissues-test/labels{/name}",
    "releases_url": "https://api.github.com/repos/b2z/jissues-test/releases{/id}",
    "created_at": "2015-05-16T13:53:43Z",
    "updated_at": "2015-05-16T13:54:17Z",
    "pushed_at": "2015-07-09T18:16:41Z",
    "git_url": "git://github.com/b2z/jissues-test.git",
    "ssh_url": "git@github.com:b2z/jissues-test.git",
    "clone_url": "https://github.com/b2z/jissues-test.git",
    "svn_url": "https://github.com/b2z/jissues-test",
    "homepage": null,
    "size": 285,
    "stargazers_count": 0,
    "watchers_count": 0,
    "language": null,
    "has_issues": true,
    "has_downloads": true,
    "has_wiki": false,
    "has_pages": false,
    "forks_count": 1,
    "mirror_url": null,
    "open_issues_count": 18,
    "forks": 1,
    "open_issues": 18,
    "watchers": 0,
    "default_branch": "master"
  },
  "sender": {
    "login": "b2z",
    "id": 3051676,
    "avatar_url": "https://avatars.githubusercontent.com/u/3051676?v=3",
    "gravatar_id": "",
    "url": "https://api.github.com/users/b2z",
    "html_url": "https://github.com/b2z",
    "followers_url": "https://api.github.com/users/b2z/followers",
    "following_url": "https://api.github.com/users/b2z/following{/other_user}",
    "gists_url": "https://api.github.com/users/b2z/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/b2z/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/b2z/subscriptions",
    "organizations_url": "https://api.github.com/users/b2z/orgs",
    "repos_url": "https://api.github.com/users/b2z/repos",
    "events_url": "https://api.github.com/users/b2z/events{/privacy}",
    "received_events_url": "https://api.github.com/users/b2z/received_events",
    "type": "User",
    "site_admin": false
  }
}
avatar mbabker
mbabker - comment - 9 Jul 2015

The only other thing I can think of for that then is listening for the push API event and trying to match things up.

avatar b2z
b2z - comment - 9 Jul 2015

Here is closing push payload. The only connection with issues is commit message. We can in fact parse it for keywords like close and fix and get issue number also as it always comes with #. Not sure about this.

{
  "ref": "refs/heads/master",
  "before": "dd78cdb9abf0d3cdd2d350e3512b2e117038cf4a",
  "after": "bf69fe881af2c063fb9ae8305ce7bf1acde2d658",
  "created": false,
  "deleted": false,
  "forced": false,
  "base_ref": null,
  "compare": "https://github.com/b2z/jissues-test/compare/dd78cdb9abf0...bf69fe881af2",
  "commits": [
    {
      "id": "bf69fe881af2c063fb9ae8305ce7bf1acde2d658",
      "distinct": true,
      "message": "Close #2",
      "timestamp": "2015-07-09T21:39:10+03:00",
      "url": "https://github.com/b2z/jissues-test/commit/bf69fe881af2c063fb9ae8305ce7bf1acde2d658",
      "author": {
        "name": "Dmitry Rekun",
        "email": "bzzjuka [ at ] gmail.com",
        "username": "b2z"
      },
      "committer": {
        "name": "Dmitry Rekun",
        "email": "bzzjuka [ at ] gmail.com",
        "username": "b2z"
      },
      "added": [

      ],
      "removed": [

      ],
      "modified": [
        "README.md"
      ]
    }
  ],
  "head_commit": {
    "id": "bf69fe881af2c063fb9ae8305ce7bf1acde2d658",
    "distinct": true,
    "message": "Close #2",
    "timestamp": "2015-07-09T21:39:10+03:00",
    "url": "https://github.com/b2z/jissues-test/commit/bf69fe881af2c063fb9ae8305ce7bf1acde2d658",
    "author": {
      "name": "Dmitry Rekun",
      "email": "bzzjuka [ at ] gmail.com",
      "username": "b2z"
    },
    "committer": {
      "name": "Dmitry Rekun",
      "email": "bzzjuka [ at ] gmail.com",
      "username": "b2z"
    },
    "added": [

    ],
    "removed": [

    ],
    "modified": [
      "README.md"
    ]
  },
  "repository": {
    "id": 35725598,
    "name": "jissues-test",
    "full_name": "b2z/jissues-test",
    "owner": {
      "name": "b2z",
      "email": "bzzjuka [ at ] gmail.com"
    },
    "private": false,
    "html_url": "https://github.com/b2z/jissues-test",
    "description": "Joomla! Issue Tracker Application testing repo",
    "fork": false,
    "url": "https://github.com/b2z/jissues-test",
    "forks_url": "https://api.github.com/repos/b2z/jissues-test/forks",
    "keys_url": "https://api.github.com/repos/b2z/jissues-test/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/b2z/jissues-test/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/b2z/jissues-test/teams",
    "hooks_url": "https://api.github.com/repos/b2z/jissues-test/hooks",
    "issue_events_url": "https://api.github.com/repos/b2z/jissues-test/issues/events{/number}",
    "events_url": "https://api.github.com/repos/b2z/jissues-test/events",
    "assignees_url": "https://api.github.com/repos/b2z/jissues-test/assignees{/user}",
    "branches_url": "https://api.github.com/repos/b2z/jissues-test/branches{/branch}",
    "tags_url": "https://api.github.com/repos/b2z/jissues-test/tags",
    "blobs_url": "https://api.github.com/repos/b2z/jissues-test/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/b2z/jissues-test/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/b2z/jissues-test/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/b2z/jissues-test/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/b2z/jissues-test/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/b2z/jissues-test/languages",
    "stargazers_url": "https://api.github.com/repos/b2z/jissues-test/stargazers",
    "contributors_url": "https://api.github.com/repos/b2z/jissues-test/contributors",
    "subscribers_url": "https://api.github.com/repos/b2z/jissues-test/subscribers",
    "subscription_url": "https://api.github.com/repos/b2z/jissues-test/subscription",
    "commits_url": "https://api.github.com/repos/b2z/jissues-test/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/b2z/jissues-test/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/b2z/jissues-test/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/b2z/jissues-test/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/b2z/jissues-test/contents/{+path}",
    "compare_url": "https://api.github.com/repos/b2z/jissues-test/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/b2z/jissues-test/merges",
    "archive_url": "https://api.github.com/repos/b2z/jissues-test/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/b2z/jissues-test/downloads",
    "issues_url": "https://api.github.com/repos/b2z/jissues-test/issues{/number}",
    "pulls_url": "https://api.github.com/repos/b2z/jissues-test/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/b2z/jissues-test/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/b2z/jissues-test/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/b2z/jissues-test/labels{/name}",
    "releases_url": "https://api.github.com/repos/b2z/jissues-test/releases{/id}",
    "created_at": 1431784423,
    "updated_at": "2015-05-16T13:54:17Z",
    "pushed_at": 1436467159,
    "git_url": "git://github.com/b2z/jissues-test.git",
    "ssh_url": "git@github.com:b2z/jissues-test.git",
    "clone_url": "https://github.com/b2z/jissues-test.git",
    "svn_url": "https://github.com/b2z/jissues-test",
    "homepage": null,
    "size": 285,
    "stargazers_count": 0,
    "watchers_count": 0,
    "language": null,
    "has_issues": true,
    "has_downloads": true,
    "has_wiki": false,
    "has_pages": false,
    "forks_count": 1,
    "mirror_url": null,
    "open_issues_count": 18,
    "forks": 1,
    "open_issues": 18,
    "watchers": 0,
    "default_branch": "master",
    "stargazers": 0,
    "master_branch": "master"
  },
  "pusher": {
    "name": "b2z",
    "email": "bzzjuka [ at ] gmail.com"
  },
  "sender": {
    "login": "b2z",
    "id": 3051676,
    "avatar_url": "https://avatars.githubusercontent.com/u/3051676?v=3",
    "gravatar_id": "",
    "url": "https://api.github.com/users/b2z",
    "html_url": "https://github.com/b2z",
    "followers_url": "https://api.github.com/users/b2z/followers",
    "following_url": "https://api.github.com/users/b2z/following{/other_user}",
    "gists_url": "https://api.github.com/users/b2z/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/b2z/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/b2z/subscriptions",
    "organizations_url": "https://api.github.com/users/b2z/orgs",
    "repos_url": "https://api.github.com/users/b2z/repos",
    "events_url": "https://api.github.com/users/b2z/events{/privacy}",
    "received_events_url": "https://api.github.com/users/b2z/received_events",
    "type": "User",
    "site_admin": false
  }
}
avatar mbabker
mbabker - comment - 9 Jul 2015

Geeze, they really don't make it easy to link a closed issue to a commit that closed it.

avatar b2z
b2z - comment - 9 Jul 2015

True :disappointed:

avatar b2z b2z - change - 26 Oct 2015
Labels Added: enhancement
avatar mbabker
mbabker - comment - 10 Mar 2016

Considering I'm finally getting most of the charts working, figuring out something to do with this is going to be beneficial at some point as one of the charts displays a count of items closed by fixing them. I still have no idea what that something is (maybe it really does end up turning into parsing commit messages, yuck).

avatar mbabker
mbabker - comment - 20 May 2016

Fixed via #753

avatar mbabker mbabker - change - 20 May 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-05-20 15:51:06
Closed_By mbabker
avatar mbabker mbabker - close - 20 May 2016

Add a Comment

Login with GitHub to post a comment