Class: Turnins
- Inherits:
-
Object
- Object
- Turnins
- Defined in:
- lib/turnins.rb
Constant Summary collapse
- BASE_ACCOUNT =
'ga-wdi-boston'
- STUDENT_ACCOUNTS =
%w{MaxBlaushild kbondanza annie-b asbren13 lady3bean abroccoli RDegnen idelairre Katyf jcyeathatsme brandonkoo caitlynl22 HelixPenguin jrutledg goodeats cgpacifico npupillo dstop75 LookOut800 hthi catiffles tys1019 villanagi89 J-Weeks kevin2098 }
Instance Method Summary collapse
-
#initialize ⇒ Turnins
constructor
A new instance of Turnins.
Constructor Details
#initialize ⇒ Turnins
Returns a new instance of Turnins.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/turnins.rb', line 31 def initialize if ARGV[0].nil? abort("Usage: turnins REPONAME") end base_repo = BASE_ACCOUNT + '/' + ARGV[0] open_prs = Octokit.pull_requests base_repo, state: 'open' closed_prs = Octokit.pull_requests base_repo, state: 'closed' pull_requests = open_prs + closed_prs who_turned_in = pull_requests.map {|pr| pr[:user][:login] } puts STUDENT_ACCOUNTS - who_turned_in end |