User Tools

Site Tools


oss-health-metrics:metrics:contribution-acceptance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
oss-health-metrics:metrics:contribution-acceptance [2017/04/05 20:09]
abuhman [7. Pseudo Code/Query]
oss-health-metrics:metrics:contribution-acceptance [2017/05/18 00:16]
klumbard [8. External References (Literature)]
Line 1: Line 1:
 +__**[[oss-health-metrics:​metrics|<<​ Back to List of Activity Metrics]]**__
 ====== Contribution Acceptance ====== ====== Contribution Acceptance ======
-===== 1. Acronym ===== 
  
- +===== 1. Description =====
-===== 2. Alternate Names ===== +
- +
- +
-===== 3. Classification ===== +
-Community Health +
- +
-===== 4. Description =====+
 Ratio of contributions accepted vs. closed without acceptance Ratio of contributions accepted vs. closed without acceptance
  
-==== Visualization ​====+===== 2. Use Cases =====
  
-==== Interpretation ​==== +===== 3Sample Visualization ​=====
- +
- +
-===== 5Known Implementations ​===== +
- +
- +
-===== 6. Data Source ===== +
-GHTorrent Database +
- +
-===== 7. Pseudo Code/Query ===== +
-==== Pull Requests Made vs Pull Requests Closed ==== +
- +
-=== All pull requests that were created=== +
- +
- SELECT count(distinct pull_request_id) as num_opened, projects.name as project_name,​ projects.url as url +
- FROM msr14.pull_request_history +
-     join pull_requests on pull_request_history.pull_request_id = pull_requests.id +
-     join projects on pull_requests.base_repo_id = projects.id +
- where action = '​opened'​ +
- group by projects.id +
-  +
-===Pull Requests Closed=== +
- +
- SELECT count(distinct pull_request_id) as num_closed, projects.name as project_name,​ projects.url as url +
- FROM msr14.pull_request_history +
-     join pull_requests on pull_request_history.pull_request_id = pull_requests.id +
-     join projects on pull_requests.base_repo_id = projects.id +
- where action = '​closed'​ +
- group by projects.id +
-  +
-===Pull requests currently open=== +
- +
- SELECT count(distinct pull_request_id) as num_still_open,​ projects.name as project_name,​ projects.url as url +
- FROM msr14.pull_request_history +
-     join pull_requests on pull_request_history.pull_request_id = pull_requests.id +
-     join projects on pull_requests.base_repo_id = projects.id +
- where pull_request_id not in  +
-     (SELECT pull_request_id +
-     FROM msr14.pull_request_history +
-     where action = '​closed'​) +
- group by projects.id+
  
-=== Pull Request Acceptance Rate (Merged over Opened)===+===== 4. Sample Implementations ===== 
 +===GHTorrent: ​Pull Request Acceptance Rate (Merged over Opened)===
  
     SELECT projects.name as project_name,​ DATE(date_created),​ CAST(num_approved AS DECIMAL)/​CAST(num_open AS DECIMAL) AS approved_over_opened     SELECT projects.name as project_name,​ DATE(date_created),​ CAST(num_approved AS DECIMAL)/​CAST(num_open AS DECIMAL) AS approved_over_opened
Line 76: Line 30:
      JOIN projects ON repo_id = projects.id      JOIN projects ON repo_id = projects.id
            
-=== Pull Requests Accepted===+===GHTorrent: ​Pull Requests Accepted===
  
 Assume that a pull request with a history record of being '​merged'​ has been accepted Assume that a pull request with a history record of being '​merged'​ has been accepted
Line 98: Line 52:
  group by projects.id  group by projects.id
   
-===Pull Requests Accepted Over Time===+===GHTorrent: ​Pull Requests Accepted Over Time===
  
     SELECT COUNT(DISTINCT pull_request_id) AS num_approved,​ projects.name AS project_name,​ DATE(pull_request_history.created_at) AS accepted_on     SELECT COUNT(DISTINCT pull_request_id) AS num_approved,​ projects.name AS project_name,​ DATE(pull_request_history.created_at) AS accepted_on
Line 108: Line 62:
  
  
-=== Pull Requests Rejected===+===GHTorrent: ​Pull Requests Rejected===
  
 Assume that a pull request with a history record of being '​closed'​ but lacking one of being '​merged'​ has been rejected. Assume that a pull request with a history record of being '​closed'​ but lacking one of being '​merged'​ has been rejected.
Line 123: Line 77:
  
  
-===== 8Data Exchange Format ​===== +===== 5Known Implementations ​===== 
-Describe how the metric is encoded for sharing and communicating between programs.+ 
 +[[https://​github.com/​OSSHealth/​ghdata|GHData]]
  
-===== 9. References ​to Academic ​Literature ===== +===== 6External ​References ​(Literature=====
-Papers released in the academic literature that uses the metric.+
  
-===== 10. Internet References ===== 
-Links to websites that add value to the understanding of the metric. 
  
-===== 11. Contributors ===== 
-Authors of the metric page and authors who made significant changes. 
oss-health-metrics/metrics/contribution-acceptance.txt · Last modified: 2017/10/06 20:52 by GeorgLink