github-lister-core 0.1.3 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/ask_question.yml +22 -0
- data/.github/ISSUE_TEMPLATE/bug_report.yml +58 -0
- data/.github/ISSUE_TEMPLATE/config.yml +7 -0
- data/.github/ISSUE_TEMPLATE/feature_request.yml +43 -0
- data/.github/workflows/pipeline.yml +99 -0
- data/.gitignore +1 -14
- data/CHANGELOG.md +27 -1
- data/LICENSE.md +1 -1
- data/README.md +31 -49
- data/VERSION.txt +1 -1
- data/lib/github-lister-core/errors.rb +25 -16
- data/lib/github-lister-core/utils.rb +1 -0
- data/lib/github-lister-core/version.rb +1 -1
- data/lib/github-lister-core/workflows.rb +29 -0
- data/lib/github-lister-core/wrapper.rb +4 -2
- data/lib/github-lister-core.rb +1 -0
- data/testing/get-raw.rb +2 -4
- metadata +8 -9
- data/.github/ISSUE_TEMPLATE/ask_question.md +0 -10
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -30
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- data/.github/SUPPORT.md +0 -8
- data/.travis.yml +0 -129
- data/stale.yml +0 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22f46d214a9ede3433e161770c99c8dc23f489c5c522e4431d39f5d14bfb75a1
|
|
4
|
+
data.tar.gz: '096668b123f11a7da5557ccb85ae926e11b9b9d30beeab86ac197a5a501db349'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 408cdacea0f69213a0b14a6316503e9675761c37145abbcbe140f99c6991775b1c75b8e2a331898f7c12bfc560024ef137da83fccc946ac5a4a221761151b896
|
|
7
|
+
data.tar.gz: 67d007d2954fa5c02dc0babfd8e0c4f79afd50935c2aaae3ecf756c5e6469cad6d6bb798d5675bc0f38050497923b5a64953f7677f031eb322bad1d94f460615
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Ask a question
|
|
2
|
+
description: If you don't have a specific issue or bug to report you can still ask us questions and we will do our best to answer them
|
|
3
|
+
title: "[Question]: "
|
|
4
|
+
labels: [question, triage]
|
|
5
|
+
assignees:
|
|
6
|
+
- tgwolf
|
|
7
|
+
body:
|
|
8
|
+
- type: textarea
|
|
9
|
+
id: question
|
|
10
|
+
attributes:
|
|
11
|
+
label: What is your question?
|
|
12
|
+
description: Please give us time to review your question and formulate an answer.
|
|
13
|
+
validations:
|
|
14
|
+
required: true
|
|
15
|
+
- type: checkboxes
|
|
16
|
+
id: terms
|
|
17
|
+
attributes:
|
|
18
|
+
label: Code of Conduct
|
|
19
|
+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com)
|
|
20
|
+
options:
|
|
21
|
+
- label: I agree to follow this project's Code of Conduct
|
|
22
|
+
required: true
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Report a bug
|
|
2
|
+
description: Found a bug? Let us knonw what the issue is and we will attempt to fix it
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: [bug, triage]
|
|
5
|
+
assignees:
|
|
6
|
+
- tgwolf
|
|
7
|
+
body:
|
|
8
|
+
- type: textarea
|
|
9
|
+
id: what-happened
|
|
10
|
+
attributes:
|
|
11
|
+
label: What happened?
|
|
12
|
+
description: A clear and concise description of what the bug is.
|
|
13
|
+
validations:
|
|
14
|
+
required: true
|
|
15
|
+
- type: textarea
|
|
16
|
+
id: expected-behavior
|
|
17
|
+
attributes:
|
|
18
|
+
label: Expected behavior
|
|
19
|
+
description: A clear and concise description of what you expected to happen.
|
|
20
|
+
validations:
|
|
21
|
+
required: true
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: reproduce
|
|
24
|
+
attributes:
|
|
25
|
+
label: How do we reproduct the bug?
|
|
26
|
+
description: What are the steps we need to take to reproduce the behavior?
|
|
27
|
+
validations:
|
|
28
|
+
required: true
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: logs
|
|
31
|
+
attributes:
|
|
32
|
+
label: Relevant log output
|
|
33
|
+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
|
34
|
+
render: shell
|
|
35
|
+
validations:
|
|
36
|
+
required: false
|
|
37
|
+
- type: textarea
|
|
38
|
+
id: screenshoots
|
|
39
|
+
attributes:
|
|
40
|
+
label: Screeenshots
|
|
41
|
+
description: Upload any screenshots that might help demonstrate the bug.
|
|
42
|
+
validations:
|
|
43
|
+
required: false
|
|
44
|
+
- type: textarea
|
|
45
|
+
id: additional-information
|
|
46
|
+
attributes:
|
|
47
|
+
label: Additional information
|
|
48
|
+
description: Please provide any additional information that you think will help us to resolve this bug.
|
|
49
|
+
validations:
|
|
50
|
+
required: false
|
|
51
|
+
- type: checkboxes
|
|
52
|
+
id: terms
|
|
53
|
+
attributes:
|
|
54
|
+
label: Code of Conduct
|
|
55
|
+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com)
|
|
56
|
+
options:
|
|
57
|
+
- label: I agree to follow this project's Code of Conduct
|
|
58
|
+
required: true
|
|
@@ -1 +1,8 @@
|
|
|
1
1
|
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Support us
|
|
4
|
+
url: https://ko-fi.com/wolfsoftware
|
|
5
|
+
about: Show your support
|
|
6
|
+
- name: Visit our website
|
|
7
|
+
url: https://wolfsoftware.com/
|
|
8
|
+
about: Visit the Wolf Software website and see what else we do and what services we offer
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Request a new feature
|
|
2
|
+
description: Got an idea for a new feature? Let us know what you want and we will see if we can add it
|
|
3
|
+
title: "[Feature Request]: "
|
|
4
|
+
labels: [enhancement, triage]
|
|
5
|
+
assignees:
|
|
6
|
+
- tgwolf
|
|
7
|
+
body:
|
|
8
|
+
- type: textarea
|
|
9
|
+
id: releated-to
|
|
10
|
+
attributes:
|
|
11
|
+
label: Is your feature request related to a problem?
|
|
12
|
+
description: A clear and concise description of what the problem is. E.g. I'm always frustrated when ...
|
|
13
|
+
validations:
|
|
14
|
+
required: true
|
|
15
|
+
- type: textarea
|
|
16
|
+
id: suggested-solution
|
|
17
|
+
attributes:
|
|
18
|
+
label: Suggested Solution
|
|
19
|
+
description: A clear and concise description of what you want to see implemented.
|
|
20
|
+
validations:
|
|
21
|
+
required: true
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: alternatives
|
|
24
|
+
attributes:
|
|
25
|
+
label: Describe alternatives you've considered
|
|
26
|
+
description: A clear and concise description of any alternative solutions or features you've considered.
|
|
27
|
+
validations:
|
|
28
|
+
required: true
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: additional-information
|
|
31
|
+
attributes:
|
|
32
|
+
label: Additional information
|
|
33
|
+
description: Please provide any additional information that you think will help us to resolve this bug.
|
|
34
|
+
validations:
|
|
35
|
+
required: false
|
|
36
|
+
- type: checkboxes
|
|
37
|
+
id: terms
|
|
38
|
+
attributes:
|
|
39
|
+
label: Code of Conduct
|
|
40
|
+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com)
|
|
41
|
+
options:
|
|
42
|
+
- label: I agree to follow this project's Code of Conduct
|
|
43
|
+
required: true
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
name: pipeline
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
bundler:
|
|
6
|
+
runs-on: ubuntu-latest
|
|
7
|
+
strategy:
|
|
8
|
+
matrix:
|
|
9
|
+
ruby: [ '2.6', '2.7', '3.0', 'head' ]
|
|
10
|
+
name: Bundler Test on Ruby ${{ matrix.ruby }}
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v2
|
|
13
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
|
14
|
+
uses: ruby/setup-ruby@v1
|
|
15
|
+
with:
|
|
16
|
+
ruby-version: ${{ matrix.ruby }}
|
|
17
|
+
- name: Run Bundle Install
|
|
18
|
+
run: bundle install
|
|
19
|
+
- name: Run Bundle Exec rake
|
|
20
|
+
run: bundle exec rake
|
|
21
|
+
reek:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
strategy:
|
|
24
|
+
matrix:
|
|
25
|
+
ruby: [ '2.6', '2.7', '3.0', 'head' ]
|
|
26
|
+
name: Reek Test on Ruby ${{ matrix.ruby }}
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v2
|
|
29
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
|
30
|
+
uses: ruby/setup-ruby@v1
|
|
31
|
+
with:
|
|
32
|
+
ruby-version: ${{ matrix.ruby }}
|
|
33
|
+
- name: Run Reek
|
|
34
|
+
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/reek/master/pipeline.sh)
|
|
35
|
+
rubocop:
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
strategy:
|
|
38
|
+
matrix:
|
|
39
|
+
ruby: [ '2.6', '2.7', '3.0', 'head' ]
|
|
40
|
+
name: Rubocop Test on Ruby ${{ matrix.ruby }}
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v2
|
|
43
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
|
44
|
+
uses: ruby/setup-ruby@v1
|
|
45
|
+
with:
|
|
46
|
+
ruby-version: ${{ matrix.ruby }}
|
|
47
|
+
- name: Run Rubocop
|
|
48
|
+
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/rubocop/master/pipeline.sh)
|
|
49
|
+
awesomebot:
|
|
50
|
+
name: Awesomebot
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v2
|
|
54
|
+
- name: Set up Ruby 3.0
|
|
55
|
+
uses: ruby/setup-ruby@v1
|
|
56
|
+
with:
|
|
57
|
+
ruby-version: 3.0
|
|
58
|
+
- name: Run Awesomebot
|
|
59
|
+
env:
|
|
60
|
+
FLAGS: "default"
|
|
61
|
+
EXCLUDE_FILES: "CHANGELOG.md"
|
|
62
|
+
WHITELIST: "https://img.shields.io"
|
|
63
|
+
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/awesomebot/master/pipeline.sh)
|
|
64
|
+
shellcheck:
|
|
65
|
+
name: ShellCheck
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@v2
|
|
69
|
+
- name: Run Shellcheck
|
|
70
|
+
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/shellcheck/master/pipeline.sh)
|
|
71
|
+
yaml-lint:
|
|
72
|
+
name: YAML Lint
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v2
|
|
76
|
+
- name: Set up Ruby 3.0
|
|
77
|
+
uses: ruby/setup-ruby@v1
|
|
78
|
+
with:
|
|
79
|
+
ruby-version: 3.0
|
|
80
|
+
- name: Run YAML-Lint
|
|
81
|
+
run: bash <(curl -s https://raw.githubusercontent.com/CICDToolbox/yaml-lint/master/pipeline.sh)
|
|
82
|
+
slack-workflow-status:
|
|
83
|
+
if: always()
|
|
84
|
+
name: Slack Post Workflow Notification
|
|
85
|
+
needs:
|
|
86
|
+
- bundler
|
|
87
|
+
- reek
|
|
88
|
+
- rubocop
|
|
89
|
+
- awesomebot
|
|
90
|
+
- shellcheck
|
|
91
|
+
- yaml-lint
|
|
92
|
+
runs-on: ubuntu-latest
|
|
93
|
+
steps:
|
|
94
|
+
- name: Slack Post Workflow Notification
|
|
95
|
+
uses: Gamesight/slack-workflow-status@master
|
|
96
|
+
with:
|
|
97
|
+
include_jobs: true
|
|
98
|
+
repo_token: ${{secrets.GITHUB_TOKEN}}
|
|
99
|
+
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -5,11 +5,37 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
|
|
6
6
|
This changelog was automatically generated using [Caretaker](https://github.com/DevelopersToolbox/caretaker) by [Wolf Software](https://github.com/WolfSoftware)
|
|
7
7
|
|
|
8
|
+
### [v0.1.6](https://github.com/DevelopersToolbox/github-lister-core/compare/v0.1.5...v0.1.6)
|
|
9
|
+
|
|
10
|
+
> Released on June, 13th 2022
|
|
11
|
+
|
|
12
|
+
- fix pakcage and git ignore [`[head]`](https://github.com/DevelopersToolbox/github-lister-core/commit/)
|
|
13
|
+
|
|
14
|
+
### [v0.1.5](https://github.com/DevelopersToolbox/github-lister-core/compare/v0.1.4...v0.1.5)
|
|
15
|
+
|
|
16
|
+
> Released on June, 13th 2022
|
|
17
|
+
|
|
18
|
+
- Added workflows [`[84a37a1]`](https://github.com/DevelopersToolbox/github-lister-core/commit/84a37a1b39c71a48f877d972a4bbdaea9571e39d)
|
|
19
|
+
|
|
20
|
+
### [v0.1.4](https://github.com/DevelopersToolbox/github-lister-core/compare/v0.1.3...v0.1.4)
|
|
21
|
+
|
|
22
|
+
> Released on May, 20th 2022
|
|
23
|
+
|
|
24
|
+
- Added SAML error handling and also capture genereic error and surface the message [`[7b72478]`](https://github.com/DevelopersToolbox/github-lister-core/commit/7b72478d5de58b5dd862d04bf0d66345dc334b1c)
|
|
25
|
+
|
|
26
|
+
- rebrand [`[c84ea27]`](https://github.com/DevelopersToolbox/github-lister-core/commit/c84ea270deed05ecdd3f483a7921e5260ef6b46d)
|
|
27
|
+
|
|
28
|
+
- Update travis slack integration due to new slack organisation [`[ebd64b8]`](https://github.com/DevelopersToolbox/github-lister-core/commit/ebd64b8ccffddc042c6daf1f708bec13f013d60d)
|
|
29
|
+
|
|
30
|
+
- Remove ruby 2.5 support [`[2d44d88]`](https://github.com/DevelopersToolbox/github-lister-core/commit/2d44d888ec5f532336b9e1c588177591124d6b68)
|
|
31
|
+
|
|
32
|
+
- Fix travis rvm versions and slack integration [`[80efe68]`](https://github.com/DevelopersToolbox/github-lister-core/commit/80efe68ddc3c547d15852dca62e7ba293ecab2d3)
|
|
33
|
+
|
|
8
34
|
### [v0.1.3](https://github.com/DevelopersToolbox/github-lister-core/compare/v0.1.2...v0.1.3)
|
|
9
35
|
|
|
10
36
|
> Released on March, 12th 2021
|
|
11
37
|
|
|
12
|
-
- Added a begin->rescue->end to handle incorrect or expired PAT codes when looking up a username [`[
|
|
38
|
+
- Added a begin->rescue->end to handle incorrect or expired PAT codes when looking up a username [`[820d5af]`](https://github.com/DevelopersToolbox/github-lister-core/commit/820d5af0a75f96ddd20d9cf6cde0ab9c1fa404ba)
|
|
13
39
|
|
|
14
40
|
### [v0.1.2](https://github.com/DevelopersToolbox/github-lister-core/compare/v0.1.1...v0.1.2)
|
|
15
41
|
|
data/LICENSE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
=====================
|
|
3
3
|
|
|
4
|
-
Copyright © `2009-2021` `Wolf Software
|
|
4
|
+
Copyright © `2009-2021` `Wolf Software`
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person
|
|
7
7
|
obtaining a copy of this software and associated documentation
|
data/README.md
CHANGED
|
@@ -1,37 +1,34 @@
|
|
|
1
|
-
<h1 align="center">
|
|
2
|
-
<a href="https://github.com/WolfSoftware">
|
|
3
|
-
<img src="https://raw.githubusercontent.com/WolfSoftware/branding/master/images/general/banners/64/black-and-white.png" alt="Wolf Software Logo" />
|
|
4
|
-
</a>
|
|
5
|
-
<br>
|
|
6
|
-
Github Lister Core Library
|
|
7
|
-
</h1>
|
|
8
|
-
|
|
9
1
|
<p align="center">
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
2
|
+
<a href="https://github.com/DevelopersToolbox/">
|
|
3
|
+
<img src="https://cdn.wolfsoftware.com/assets/images/github/organisations/developerstoolbox/black-and-white-circle-256.png" alt="DevelopersToolbox logo" />
|
|
4
|
+
</a>
|
|
5
|
+
<br />
|
|
6
|
+
<a href="https://github.com/DevelopersToolbox/github-lister-core/actions/workflows/pipeline.yml">
|
|
7
|
+
<img src="https://img.shields.io/github/workflow/status/DevelopersToolbox/github-lister-core/pipeline/master?style=for-the-badge" alt="Github Build Status">
|
|
8
|
+
</a>
|
|
9
|
+
<a href="https://github.com/DevelopersToolbox/github-lister-core/releases/latest">
|
|
10
|
+
<img src="https://img.shields.io/github/v/release/DevelopersToolbox/github-lister-core?color=blue&label=Latest%20Release&style=for-the-badge" alt="Release">
|
|
11
|
+
</a>
|
|
12
|
+
<a href="https://github.com/DevelopersToolbox/github-lister-core/releases/latest">
|
|
13
|
+
<img src="https://img.shields.io/github/commits-since/DevelopersToolbox/github-lister-core/latest.svg?color=blue&style=for-the-badge" alt="Commits since release">
|
|
14
|
+
</a>
|
|
15
|
+
<br />
|
|
16
|
+
<a href=".github/CODE_OF_CONDUCT.md">
|
|
17
|
+
<img src="https://img.shields.io/badge/Code%20of%20Conduct-blue?style=for-the-badge" />
|
|
18
|
+
</a>
|
|
19
|
+
<a href=".github/CONTRIBUTING.md">
|
|
20
|
+
<img src="https://img.shields.io/badge/Contributing-blue?style=for-the-badge" />
|
|
21
|
+
</a>
|
|
22
|
+
<a href=".github/SECURITY.md">
|
|
23
|
+
<img src="https://img.shields.io/badge/Report%20Security%20Concern-blue?style=for-the-badge" />
|
|
24
|
+
</a>
|
|
25
|
+
<a href="https://github.com/DevelopersToolbox/github-lister-core/issues">
|
|
26
|
+
<img src="https://img.shields.io/badge/Get%20Support-blue?style=for-the-badge" />
|
|
27
|
+
</a>
|
|
28
|
+
<br />
|
|
29
|
+
<a href="https://wolfsoftware.com/">
|
|
30
|
+
<img src="https://img.shields.io/badge/Created%20by%20Wolf%20Software-blue?style=for-the-badge" />
|
|
31
|
+
</a>
|
|
35
32
|
</p>
|
|
36
33
|
|
|
37
34
|
## Overview
|
|
@@ -83,6 +80,7 @@ All of the exposed methods will return data in JSON format.
|
|
|
83
80
|
| :add_latest_release | This will add information about the latest release to the details (Requires an additional look query per repo) |
|
|
84
81
|
| :add_releases | This will add information about releases to the repository (Requires an additional look query per repo) |
|
|
85
82
|
| :add_languages | This will add the repository languages to the details (Requires an additional look query per repo) |
|
|
83
|
+
| :add_workflows | This will add the repository workflow information to the details (Requires an additional look query per repo) |
|
|
86
84
|
|
|
87
85
|
> :user, :username, :org, :org_name can be either a single user/organisation name _OR_ a comma-separated list of user/organisation names _OR_ an array of user/organisation names. If more than one name is given, the results for all names will be merged together into one result set.
|
|
88
86
|
|
|
@@ -103,19 +101,3 @@ To install this gem onto your local machine, run `bundle exec rake install`.
|
|
|
103
101
|
For local testing make sure that you run `bundle exec rspec spec` and then `rake install` to install the gem locally.
|
|
104
102
|
|
|
105
103
|
For further information please refer to the [contributing](.github/CONTRIBUTING.md) documentation.
|
|
106
|
-
|
|
107
|
-
## Contributors
|
|
108
|
-
|
|
109
|
-
<p>
|
|
110
|
-
<a href="https://github.com/TGWolf">
|
|
111
|
-
<img src="https://img.shields.io/badge/Wolf-black?style=for-the-badge" />
|
|
112
|
-
</a>
|
|
113
|
-
</p>
|
|
114
|
-
|
|
115
|
-
## Show Support
|
|
116
|
-
|
|
117
|
-
<p>
|
|
118
|
-
<a href="https://ko-fi.com/wolfsoftware">
|
|
119
|
-
<img src="https://img.shields.io/badge/Ko%20Fi-blue?style=for-the-badge&logo=ko-fi&logoColor=white" />
|
|
120
|
-
</a>
|
|
121
|
-
</p>
|
data/VERSION.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.6
|
|
@@ -6,8 +6,8 @@ class GithubListerCore
|
|
|
6
6
|
# Catch all - something bad happened but we don't know what
|
|
7
7
|
#
|
|
8
8
|
class UnknownError < StandardError
|
|
9
|
-
def initialize
|
|
10
|
-
super
|
|
9
|
+
def initialize(msg = 'Something bad happen!')
|
|
10
|
+
super
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
@@ -15,8 +15,8 @@ class GithubListerCore
|
|
|
15
15
|
# User supplied an invalid token (instead of a missing token)
|
|
16
16
|
#
|
|
17
17
|
class InvalidTokenError < StandardError
|
|
18
|
-
def initialize
|
|
19
|
-
super
|
|
18
|
+
def initialize(msg = 'Invalid Token')
|
|
19
|
+
super
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
|
|
@@ -24,8 +24,17 @@ class GithubListerCore
|
|
|
24
24
|
# User didn't supply a token but one was expected
|
|
25
25
|
#
|
|
26
26
|
class MissingTokenError < StandardError
|
|
27
|
-
def initialize
|
|
28
|
-
super
|
|
27
|
+
def initialize(msg = 'Missing Token - Please refer to https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token#creating-a-token')
|
|
28
|
+
super
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
#
|
|
33
|
+
# Handle enterprise level tokens
|
|
34
|
+
#
|
|
35
|
+
class SAMLProtected < StandardError
|
|
36
|
+
def initialize(msg = 'Resource protected by organization SAML enforcement. You must grant your Personal Access token access to this organization.')
|
|
37
|
+
super
|
|
29
38
|
end
|
|
30
39
|
end
|
|
31
40
|
|
|
@@ -33,8 +42,8 @@ class GithubListerCore
|
|
|
33
42
|
# Github rate limited us!
|
|
34
43
|
#
|
|
35
44
|
class TooManyRequests < StandardError
|
|
36
|
-
def initialize
|
|
37
|
-
super
|
|
45
|
+
def initialize(msg = 'Too Many Requests')
|
|
46
|
+
super
|
|
38
47
|
end
|
|
39
48
|
end
|
|
40
49
|
|
|
@@ -42,8 +51,8 @@ class GithubListerCore
|
|
|
42
51
|
# Generic 'not found' for users / orgs etc
|
|
43
52
|
#
|
|
44
53
|
class NotFoundError < StandardError
|
|
45
|
-
def initialize
|
|
46
|
-
super
|
|
54
|
+
def initialize(msg = 'Entity Not Found')
|
|
55
|
+
super
|
|
47
56
|
end
|
|
48
57
|
end
|
|
49
58
|
|
|
@@ -51,8 +60,8 @@ class GithubListerCore
|
|
|
51
60
|
# Docs to go here
|
|
52
61
|
#
|
|
53
62
|
class MissingOrganisationError < StandardError
|
|
54
|
-
def initialize
|
|
55
|
-
super
|
|
63
|
+
def initialize(msg = 'org_name MUST be passed as an option')
|
|
64
|
+
super
|
|
56
65
|
end
|
|
57
66
|
end
|
|
58
67
|
|
|
@@ -60,8 +69,8 @@ class GithubListerCore
|
|
|
60
69
|
# Docs to go here
|
|
61
70
|
#
|
|
62
71
|
class InvalidOptionsHashError < StandardError
|
|
63
|
-
def initialize
|
|
64
|
-
super
|
|
72
|
+
def initialize(msg = 'Options must be passed as a hash')
|
|
73
|
+
super
|
|
65
74
|
end
|
|
66
75
|
end
|
|
67
76
|
|
|
@@ -69,8 +78,8 @@ class GithubListerCore
|
|
|
69
78
|
# Must be string or array!
|
|
70
79
|
#
|
|
71
80
|
class InvalidParameterError < StandardError
|
|
72
|
-
def initialize
|
|
73
|
-
super
|
|
81
|
+
def initialize(msg = 'Value must be a string or an array')
|
|
82
|
+
super
|
|
74
83
|
end
|
|
75
84
|
end
|
|
76
85
|
end
|
|
@@ -89,6 +89,7 @@ class GithubListerCore
|
|
|
89
89
|
repos = add_latest_release_private(client, repos) if flag_set?(options, :add_latest_release)
|
|
90
90
|
repos = add_releases_private(client, repos) if flag_set?(options, :add_releases)
|
|
91
91
|
repos = add_languages_private(client, repos) if flag_set?(options, :add_languages)
|
|
92
|
+
repos = add_workflows_private(client, repos) if flag_set?(options, :add_workflows)
|
|
92
93
|
repos
|
|
93
94
|
end
|
|
94
95
|
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Add workflows to each repository
|
|
3
|
+
#
|
|
4
|
+
class GithubListerCore
|
|
5
|
+
class << self
|
|
6
|
+
#
|
|
7
|
+
# Everything below here is private
|
|
8
|
+
#
|
|
9
|
+
|
|
10
|
+
private
|
|
11
|
+
|
|
12
|
+
#
|
|
13
|
+
# Extra the slug from the payload and return it
|
|
14
|
+
#
|
|
15
|
+
def workflows_private(client, repo)
|
|
16
|
+
workflows = function_wrapper(client, 'list_workflows', repo)
|
|
17
|
+
decode_sawyer_resource(workflows) || {}
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
#
|
|
21
|
+
# Add topics to each repo
|
|
22
|
+
#
|
|
23
|
+
# This method smells of :reek:FeatureEnvy
|
|
24
|
+
def add_workflows_private(client, repos)
|
|
25
|
+
(repo_list ||= []) << Parallel.each(repos, :in_threads => repos.count) { |repo| repo[:workflows] = workflows_private(client, repo[:full_name]) }
|
|
26
|
+
repo_list.flatten
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -18,12 +18,14 @@ class GithubListerCore
|
|
|
18
18
|
raise InvalidTokenError.new if client.user_authenticated?
|
|
19
19
|
|
|
20
20
|
raise MissingTokenError.new
|
|
21
|
+
rescue Octokit::SAMLProtected
|
|
22
|
+
raise SAMLProtected.new
|
|
21
23
|
rescue Octokit::NotFound
|
|
22
24
|
raise NotFoundError.new
|
|
23
25
|
rescue Octokit::TooManyRequests
|
|
24
26
|
raise TooManyRequests.new
|
|
25
|
-
rescue StandardError
|
|
26
|
-
raise UnknownError.new
|
|
27
|
+
rescue StandardError => exception
|
|
28
|
+
raise UnknownError.new(exception.to_s)
|
|
27
29
|
end
|
|
28
30
|
results || []
|
|
29
31
|
end
|
data/lib/github-lister-core.rb
CHANGED
|
@@ -19,6 +19,7 @@ require_relative 'github-lister-core/topics'
|
|
|
19
19
|
require_relative 'github-lister-core/users'
|
|
20
20
|
require_relative 'github-lister-core/utils'
|
|
21
21
|
require_relative 'github-lister-core/version'
|
|
22
|
+
require_relative 'github-lister-core/workflows'
|
|
22
23
|
require_relative 'github-lister-core/wrapper'
|
|
23
24
|
|
|
24
25
|
#
|
data/testing/get-raw.rb
CHANGED
|
@@ -10,9 +10,7 @@ $LOAD_PATH.unshift('./lib')
|
|
|
10
10
|
require 'bundler/setup'
|
|
11
11
|
require 'github-lister-core'
|
|
12
12
|
|
|
13
|
-
# rubocop:disable Lint/UselessAssignment
|
|
14
13
|
config = { :token => 'Add token here' }
|
|
15
|
-
# rubocop:enable Lint/UselessAssignment
|
|
16
14
|
|
|
17
15
|
def count_results(results)
|
|
18
16
|
puts JSON.parse(results).size
|
|
@@ -22,8 +20,8 @@ def display_results(results)
|
|
|
22
20
|
puts JSON.pretty_generate(JSON.parse(results))
|
|
23
21
|
end
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
count_results(GithubListerCore.user_repos(config))
|
|
24
|
+
display_results(GithubListerCore.user_repos(config))
|
|
27
25
|
|
|
28
26
|
# count_results(GithubListerCore.org_repos(config))
|
|
29
27
|
# display_results(GithubListerCore.org_repos(config))
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: github-lister-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tim Gurney aka Wolf
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-06-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -149,18 +149,17 @@ files:
|
|
|
149
149
|
- ".github/CODE_OF_CONDUCT.md"
|
|
150
150
|
- ".github/CONTRIBUTING.md"
|
|
151
151
|
- ".github/FUNDING.yml"
|
|
152
|
-
- ".github/ISSUE_TEMPLATE/ask_question.
|
|
153
|
-
- ".github/ISSUE_TEMPLATE/bug_report.
|
|
152
|
+
- ".github/ISSUE_TEMPLATE/ask_question.yml"
|
|
153
|
+
- ".github/ISSUE_TEMPLATE/bug_report.yml"
|
|
154
154
|
- ".github/ISSUE_TEMPLATE/config.yml"
|
|
155
|
-
- ".github/ISSUE_TEMPLATE/feature_request.
|
|
155
|
+
- ".github/ISSUE_TEMPLATE/feature_request.yml"
|
|
156
156
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
157
157
|
- ".github/SECURITY.md"
|
|
158
|
-
- ".github/
|
|
158
|
+
- ".github/workflows/pipeline.yml"
|
|
159
159
|
- ".gitignore"
|
|
160
160
|
- ".reek.yml"
|
|
161
161
|
- ".rspec"
|
|
162
162
|
- ".rubocop.yml"
|
|
163
|
-
- ".travis.yml"
|
|
164
163
|
- CHANGELOG.md
|
|
165
164
|
- Gemfile
|
|
166
165
|
- LICENSE.md
|
|
@@ -182,8 +181,8 @@ files:
|
|
|
182
181
|
- lib/github-lister-core/users.rb
|
|
183
182
|
- lib/github-lister-core/utils.rb
|
|
184
183
|
- lib/github-lister-core/version.rb
|
|
184
|
+
- lib/github-lister-core/workflows.rb
|
|
185
185
|
- lib/github-lister-core/wrapper.rb
|
|
186
|
-
- stale.yml
|
|
187
186
|
- testing/get-raw.rb
|
|
188
187
|
homepage: https://github.com/DevelopersToolbox/github-lister-core
|
|
189
188
|
licenses:
|
|
@@ -207,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
207
206
|
- !ruby/object:Gem::Version
|
|
208
207
|
version: '0'
|
|
209
208
|
requirements: []
|
|
210
|
-
rubygems_version: 3.
|
|
209
|
+
rubygems_version: 3.3.7
|
|
211
210
|
signing_key:
|
|
212
211
|
specification_version: 4
|
|
213
212
|
summary: Provide a simple, fast and, clean way to extract repository information from
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: ''
|
|
5
|
-
labels: 'bug'
|
|
6
|
-
assignees: 'TGWolf'
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Describe the bug**
|
|
11
|
-
A clear and concise description of what the bug is.
|
|
12
|
-
|
|
13
|
-
**To Reproduce**
|
|
14
|
-
Steps to reproduce the behavior:
|
|
15
|
-
1.
|
|
16
|
-
2.
|
|
17
|
-
3.
|
|
18
|
-
4.
|
|
19
|
-
|
|
20
|
-
**Expected behavior**
|
|
21
|
-
A clear and concise description of what you expected to happen.
|
|
22
|
-
|
|
23
|
-
**Screenshots**
|
|
24
|
-
If applicable, add screenshots to help explain your problem.
|
|
25
|
-
|
|
26
|
-
**Environment**
|
|
27
|
-
Any relevant information about your environment, OS version, virtualised or not.
|
|
28
|
-
|
|
29
|
-
**Additional context**
|
|
30
|
-
Add any other context about the problem here.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature request
|
|
3
|
-
about: Suggest an idea for this project
|
|
4
|
-
title: ''
|
|
5
|
-
labels: 'enhancement'
|
|
6
|
-
assignees: 'TGWolf'
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Is your feature request related to a problem? Please describe.**
|
|
11
|
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
-
|
|
13
|
-
**Describe the solution you'd like**
|
|
14
|
-
A clear and concise description of what you want to happen.
|
|
15
|
-
|
|
16
|
-
**Describe alternatives you've considered**
|
|
17
|
-
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
-
|
|
19
|
-
**Additional context**
|
|
20
|
-
Add any other context or screenshots about the feature request here.
|
data/.github/SUPPORT.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Support
|
|
2
|
-
|
|
3
|
-
If the documentation is not providing the information that you require then you have a couple of options:
|
|
4
|
-
|
|
5
|
-
1. [Start a discussion](https://github.com/DevelopersToolbox/github-lister-core/discussions).
|
|
6
|
-
1. [Open an issue](https://github.com/DevelopersToolbox/github-lister-core/issues), using the `Ask a question` option.
|
|
7
|
-
|
|
8
|
-
> This project has a [code of conduct](CODE_OF_CONDUCT.md). By interacting with this repository, organization, or community you agree to abide by its terms.
|
data/.travis.yml
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
matrix:
|
|
2
|
-
include:
|
|
3
|
-
- language: ruby
|
|
4
|
-
name: Bundler (rvm 2.5)
|
|
5
|
-
rvm: 2.5
|
|
6
|
-
before_install:
|
|
7
|
-
- gem install bundler
|
|
8
|
-
- language: ruby
|
|
9
|
-
name: Bundler (rvm 2.6)
|
|
10
|
-
rvm: 2.6
|
|
11
|
-
before_install:
|
|
12
|
-
- gem install bundler
|
|
13
|
-
- language: ruby
|
|
14
|
-
name: Bundler (rvm 2.7)
|
|
15
|
-
rvm: 2.7
|
|
16
|
-
before_install:
|
|
17
|
-
- gem install bundler
|
|
18
|
-
- language: ruby
|
|
19
|
-
name: Bundler (rvm 3.0)
|
|
20
|
-
rvm: 3.0
|
|
21
|
-
before_install:
|
|
22
|
-
- gem install bundler
|
|
23
|
-
- language: ruby
|
|
24
|
-
name: Rubocop (rvm 2.5)
|
|
25
|
-
rvm: 2.5
|
|
26
|
-
before_install:
|
|
27
|
-
- git clone https://github.com/TravisToolbox/rubocop.git
|
|
28
|
-
install:
|
|
29
|
-
- "./rubocop/install.sh"
|
|
30
|
-
script:
|
|
31
|
-
- "./rubocop/scan.sh"
|
|
32
|
-
- language: ruby
|
|
33
|
-
name: Rubocop (rvm 2.6)
|
|
34
|
-
rvm: 2.6
|
|
35
|
-
before_install:
|
|
36
|
-
- git clone https://github.com/TravisToolbox/rubocop.git
|
|
37
|
-
install:
|
|
38
|
-
- "./rubocop/install.sh"
|
|
39
|
-
script:
|
|
40
|
-
- "./rubocop/scan.sh"
|
|
41
|
-
- language: ruby
|
|
42
|
-
name: Rubocop (rvm 2.7)
|
|
43
|
-
rvm: 2.7
|
|
44
|
-
before_install:
|
|
45
|
-
- git clone https://github.com/TravisToolbox/rubocop.git
|
|
46
|
-
install:
|
|
47
|
-
- "./rubocop/install.sh"
|
|
48
|
-
script:
|
|
49
|
-
- "./rubocop/scan.sh"
|
|
50
|
-
- language: ruby
|
|
51
|
-
name: Rubocop (rvm 3.0)
|
|
52
|
-
rvm: 3.0
|
|
53
|
-
before_install:
|
|
54
|
-
- git clone https://github.com/TravisToolbox/rubocop.git
|
|
55
|
-
install:
|
|
56
|
-
- "./rubocop/install.sh"
|
|
57
|
-
script:
|
|
58
|
-
- "./rubocop/scan.sh"
|
|
59
|
-
- language: ruby
|
|
60
|
-
name: Reek (rvm 2.5)
|
|
61
|
-
rvm: 2.5
|
|
62
|
-
before_install:
|
|
63
|
-
- git clone https://github.com/TravisToolbox/reek.git
|
|
64
|
-
install:
|
|
65
|
-
- "./reek/install.sh"
|
|
66
|
-
script:
|
|
67
|
-
- "./reek/scan.sh"
|
|
68
|
-
- language: ruby
|
|
69
|
-
name: Reek (rvm 2.6)
|
|
70
|
-
rvm: 2.6
|
|
71
|
-
before_install:
|
|
72
|
-
- git clone https://github.com/TravisToolbox/reek.git
|
|
73
|
-
install:
|
|
74
|
-
- "./reek/install.sh"
|
|
75
|
-
script:
|
|
76
|
-
- "./reek/scan.sh"
|
|
77
|
-
- language: ruby
|
|
78
|
-
name: Reek (rvm 2.7)
|
|
79
|
-
rvm: 2.7
|
|
80
|
-
before_install:
|
|
81
|
-
- git clone https://github.com/TravisToolbox/reek.git
|
|
82
|
-
install:
|
|
83
|
-
- "./reek/install.sh"
|
|
84
|
-
script:
|
|
85
|
-
- "./reek/scan.sh"
|
|
86
|
-
- language: ruby
|
|
87
|
-
name: Reek (rvm 3.0)
|
|
88
|
-
rvm: 3.0
|
|
89
|
-
before_install:
|
|
90
|
-
- git clone https://github.com/TravisToolbox/reek.git
|
|
91
|
-
install:
|
|
92
|
-
- "./reek/install.sh"
|
|
93
|
-
script:
|
|
94
|
-
- "./reek/scan.sh"
|
|
95
|
-
- language: ruby
|
|
96
|
-
name: YAML Linting (rvm 2.7)
|
|
97
|
-
rvm: 2.7
|
|
98
|
-
before_install:
|
|
99
|
-
- git clone https://github.com/TravisToolbox/yaml-lint
|
|
100
|
-
install:
|
|
101
|
-
- "./yaml-lint/install.sh"
|
|
102
|
-
script:
|
|
103
|
-
- "./yaml-lint/scan.sh"
|
|
104
|
-
- language: bash
|
|
105
|
-
name: Shellcheck (Bash)
|
|
106
|
-
os: linux
|
|
107
|
-
arch: arm64-graviton2
|
|
108
|
-
before_install:
|
|
109
|
-
- git clone https://github.com/TravisToolbox/shellcheck
|
|
110
|
-
install:
|
|
111
|
-
- "./shellcheck/install.sh"
|
|
112
|
-
script:
|
|
113
|
-
- "./shellcheck/scan.sh"
|
|
114
|
-
- language: ruby
|
|
115
|
-
name: Link Checking (rvm 2.7)
|
|
116
|
-
rvm: 2.7
|
|
117
|
-
env:
|
|
118
|
-
- WHITELIST="https://img.shields.io"
|
|
119
|
-
- EXCLUDE_FILES="CHANGELOG.md,github-lister-core.gemspec"
|
|
120
|
-
before_install:
|
|
121
|
-
- git clone https://github.com/TravisToolbox/awesomebot
|
|
122
|
-
install:
|
|
123
|
-
- "./awesomebot/install.sh"
|
|
124
|
-
script:
|
|
125
|
-
- "./awesomebot/scan.sh"
|
|
126
|
-
notifications:
|
|
127
|
-
email: false
|
|
128
|
-
slack:
|
|
129
|
-
secure: OAh1PldyUAdO1CaXQhktRIqxWJc0O7D+3aHr1b6iiK4l2Kkzy2UcRYevw61UoBZj3/7PAnC1Pp0PttekcqAtrTx6ZVA9SP2md0BT9M0VzDrSePxT4T0gnj+ESb6vT4xYS0jz83hu4T+s0YoRrCZR4OOWyFHobEJzxxjRjf4nK9ldmwMaSFlncGst9tHIxjKgKApnnA0TttreVDM4y6Szq1CAUv0N6MUN+bIzwaQhKAhjdRqmZEYsufxeia6WUeN57z6Bt06y5pCSt5rwF3uQUxN8zcP7Sl5nCqBhlsh+LlXYUOlK7l8tVJ4r/yX0reHf8YXqA+IEKVatpjSNu4c9M6zyku/L547hWyRuVKe/Q4ADWgI45pipweE79dRCwPmclNNT8obhoQcaLGWj1wsV9udibOy8fGZYWXESTk6pUCcQWJmdIoyvrCgICvRFCs6QfzWqKcgerkv+8V1RwlPx7wAStRvgOAmoZ3RLjjbXbwymriHYTIim1grDTegQZJa4R3ITUuzy8R0Neod/HO5FO1M/XMiFJI2qIpjX1hT5gFRSb2JvzK0JrdAiuZ8xEk02r8Ix/hxJCF95TSe9VmIL5wKKp108OwXXOisF/bNzExgRK5gGKnNMoFW2aVmM3SAd9R8JPWdVwRTrS7PEdQE6NDKZsXaqITLy6KpPMGxcSrY=
|
data/stale.yml
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Number of days of inactivity before an issue becomes stale
|
|
2
|
-
daysUntilStale: 60
|
|
3
|
-
# Number of days of inactivity before a stale issue is closed
|
|
4
|
-
daysUntilClose: 7
|
|
5
|
-
# Issues with these labels will never be considered stale
|
|
6
|
-
exemptLabels:
|
|
7
|
-
- pinned
|
|
8
|
-
- security
|
|
9
|
-
# Label to use when marking an issue as stale
|
|
10
|
-
staleLabel: wontfix
|
|
11
|
-
# Comment to post when marking an issue as stale. Set to `false` to disable
|
|
12
|
-
markComment: >
|
|
13
|
-
This issue has been automatically marked as stale because it has not had
|
|
14
|
-
recent activity. It will be closed if no further activity occurs. Thank you
|
|
15
|
-
for your contributions.
|
|
16
|
-
# Comment to post when closing a stale issue. Set to `false` to disable
|
|
17
|
-
closeComment: true
|