This repository was archived by the owner on Apr 11, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ # ######################
3+ # Rubocop Config file #
4+ # ######################
5+
6+ inherit_gem :
7+ rubocop-github :
8+ - config/default.yml
9+
10+ Style/StringLiterals :
11+ EnforcedStyle : single_quotes
Original file line number Diff line number Diff line change 1+ ---
2+ # ##########################
3+ # ##########################
4+ # # Linter GitHub Actions ##
5+ # ##########################
6+ # ##########################
7+ name : Lint Code Base
8+
9+ #
10+ # Documentation:
11+ # https://help.github.com/en/articles/workflow-syntax-for-github-actions
12+ #
13+
14+ # ##################################
15+ # Start the job on a pull request #
16+ # ##################################
17+ on :
18+ pull_request
19+
20+ # ##############
21+ # Set the Job #
22+ # ##############
23+ jobs :
24+ super-lint :
25+ # Set the agent to run on
26+ runs-on : ubuntu-latest
27+
28+ # #################
29+ # Load all steps #
30+ # #################
31+ steps :
32+ # #########################
33+ # Checkout the code base #
34+ # #########################
35+ - name : Checkout Code
36+ uses : actions/checkout@v2
37+ with :
38+ # Full git history is needed to get a proper list of changed files within `super-linter`
39+ fetch-depth : 0
40+
41+ # ###############################
42+ # Run Linter against code base #
43+ # ###############################
44+ - name : Lint Code Base
45+ uses : github/super-linter@v3
46+ env :
47+ VALIDATE_ALL_CODEBASE : false
48+ DEFAULT_BRANCH : main
Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 0.4.2
4+
5+ Fixes:
6+
7+ - Fixed a bug with non-working membership
8+
9+ Maintenance:
10+
11+ - Added code linting
12+
313## 0.4.1
414
515- Added authentication via an environment variable ` WHATSUP_GITHUB_ACCESS_TOKEN `
Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- whatsup_github (0.4.1 )
4+ whatsup_github (0.4.2 )
55 netrc (~> 0.11 )
66 octokit (~> 4.20 )
77 thor (~> 1.1 )
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ require 'singleton'
4+
5+ # Client authorization
6+ module WhatsupGithub
7+ # Create a singleton object for Client.
8+ # Authorize with a GitHub token from $WHATSUP_GITHUB_ACCESS_TOKEN if available
9+ # Otherwise, use credentials from ~/.netrc
10+ # Otherwise, continue as a Guest
11+ class Client
12+ include Singleton
13+
14+ WHATSUP_GITHUB_ACCESS_TOKEN = ENV [ 'WHATSUP_GITHUB_ACCESS_TOKEN' ]
15+ private_constant :WHATSUP_GITHUB_ACCESS_TOKEN
16+
17+ def initialize
18+ @client =
19+ if WHATSUP_GITHUB_ACCESS_TOKEN
20+ Octokit ::Client . new ( access_token : WHATSUP_GITHUB_ACCESS_TOKEN )
21+ elsif File . exist? "#{ ENV [ 'HOME' ] } /.netrc"
22+ Octokit ::Client . new ( netrc : true )
23+ else
24+ Octokit ::Client . new
25+ end
26+ end
27+
28+ def search_issues ( query )
29+ @client . search_issues ( query )
30+ end
31+
32+ def pull_request ( repo , number )
33+ @client . pull_request ( repo , number )
34+ end
35+
36+ def org_members ( org )
37+ @client . org_members ( org )
38+ end
39+ end
40+ end
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33require 'octokit'
44require_relative 'config_reader'
5+ require_relative 'client'
56
67module WhatsupGithub
78 # Gets issues found on GitHub by query
@@ -51,16 +52,7 @@ def base_branch
5152 # Otherwise, use credentials from ~/.netrc
5253 # Otherwise, continue as a Guest
5354 def client
54- return @client if @client
55-
56- @client =
57- if ENV [ 'WHATSUP_GITHUB_ACCESS_TOKEN' ]
58- Octokit ::Client . new ( access_token : ENV [ 'WHATSUP_GITHUB_ACCESS_TOKEN' ] )
59- elsif File . exist? "#{ ENV [ 'HOME' ] } /.netrc"
60- Octokit ::Client . new ( netrc : true )
61- else
62- Octokit ::Client . new
63- end
55+ Client . instance
6456 end
6557
6658 def search_issues ( label )
Original file line number Diff line number Diff line change 33require_relative 'row'
44require_relative 'pulls'
55require_relative 'config_reader'
6- require_relative 'members'
76
87module WhatsupGithub
98 # Creates Row objects for the future table
@@ -82,7 +81,7 @@ def pulls(repo)
8281 def load_members
8382 return if @members
8483
85- @members = Members . new ( config . membership ) . members
84+ @members = client . org_members ( config . membership )
8685 end
8786
8887 def member_logins
@@ -93,5 +92,9 @@ def member_logins
9392 def config
9493 Config . instance
9594 end
95+
96+ def client
97+ Client . instance
98+ end
9699 end
97100end
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module WhatsupGithub
4- VERSION = '0.4.1 '
4+ VERSION = '0.4.2 '
55end
You can’t perform that action at this time.
0 commit comments