octokit 9.0.0 → 9.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff098c16b9a72f52713782145e415ca2658ae2f7f48bd1c64f908507f26eb4cc
4
- data.tar.gz: 06610fe737e7bf1c9b56447828fd5c5ab19e343832b34573f4ad0c02eec41c62
3
+ metadata.gz: f755fdeae0b35f76932ffa267d2d73e01b5d137f5f740d8e80106fc6c0bcb226
4
+ data.tar.gz: 473dc0bee0251cb20935bc9e2160e7e92b851271dc67010bda79a94bef8adb68
5
5
  SHA512:
6
- metadata.gz: f236b59523559b762dd8c58718d0ff58d8181877740b7c2c5e10851f7be8f490e959bbf4f0b457e641c1931b562a6f5a4aa4f6d0f2b56bb63251a7cc3691faa1
7
- data.tar.gz: f7b50ad0662923a499628fd914ba6aa36df8370c1e111d3fd16582f027eeef358fa8f25502376fac9e744848dbf55e5ddc781a5a5ca1ae7638cf4acbb6545b9e
6
+ metadata.gz: 51f43e8ac4d7082309ce0e673fa0c948f5ff62e5982a2079cec57639a047be09a12a443788993929d3ab82ec6998ed49ceaa479b5d8b3fe5deef04e29549672d
7
+ data.tar.gz: bfcc814b67b08b256832fb7d168166082289a6281caa0ec81fc98ce03d376d976037e5c99c72e63d9f1440c0d1e1e5bac1c925a0fe5db6ef3d0cae7aa63e56b5
@@ -9,6 +9,144 @@ module Octokit
9
9
  #
10
10
  # @see https://docs.github.com/rest/code-scanning
11
11
  module CodeScanning
12
+ # Updates a code scanning default setup configuration
13
+ #
14
+ # @param repo [Integer, String, Repository, Hash] A GitHub repository
15
+ # @param state [String] The desired state of code scanning default setup
16
+ # @param query_suite [String] CodeQL query suite to be used
17
+ # @param languages [Array] List of CodeQL languages to be analyzed
18
+ #
19
+ # @return [Sawyer::Resource] Action Run information
20
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#update-a-code-scanning-default-setup-configuration
21
+ def update_code_scanning_default_config(repo, state, query_suite = nil, languages = nil, options = {})
22
+ options[:state] = state
23
+ options[:query_suite] = query_suite if query_suite
24
+ options[:languages] = languages if languages
25
+
26
+ patch "#{Repository.path repo}/code-scanning/default-setup", options
27
+ end
28
+
29
+ # Get Code Scanning Default Configuration
30
+ #
31
+ # @param repo [Integer, String, Repository, Hash] A GitHub repository
32
+ #
33
+ # @return [Sawyer::Resource] CodeQl Default Setup Configuration Information
34
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-code-scanning-default-setup-configuration
35
+ def get_code_scanning_default_config(repo, options = {})
36
+ get "#{Repository.path repo}/code-scanning/default-setup", options
37
+ end
38
+
39
+ # Gets a CodeQL database for a language in a repository
40
+ #
41
+ # @param repo [Integer, String, Repository, Hash] A GitHub repository
42
+ # @param language [String]
43
+ #
44
+ # @return [Sawyer::Resource] CodeQl Default Setup Configuration Information
45
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-codeql-database-for-a-repository
46
+ def get_codeql_database_for_repo(repo, language, options = {})
47
+ get "#{Repository.path repo}/code-scanning/codeql/databases/#{language}", options
48
+ end
49
+
50
+ # Lists the CodeQL databases that are available in a repository
51
+ #
52
+ # @param repo [Integer, String, Repository, Hash] A GitHub repository
53
+ #
54
+ # @return [Array] List of CodeQL Databases
55
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#list-codeql-databases-for-a-repository
56
+ def list_codeql_database_for_repo(repo, options = {})
57
+ get "#{Repository.path repo}/code-scanning/codeql/databases", options
58
+ end
59
+
60
+ # Delete a specified code scanning analysis from a repository
61
+ #
62
+ # @param repo [Integer, String, Repository, Hash] A GitHub repository
63
+ # @param analysis_id [Integer] ID of the code scanning analysis
64
+ #
65
+ # @return [Sawyer::Resource] Next Code Scanning Analysis Information
66
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#delete-a-code-scanning-analysis-from-a-repository
67
+ def delete_code_scanning_analysis(repo, analysis_id, options = {})
68
+ delete "#{Repository.path repo}/code-scanning/analyses/#{analysis_id}", options
69
+ end
70
+
71
+ # Get a code scanning analysis for a repository
72
+ #
73
+ # @param repo [Integer, String, Repository, Hash] A GitHub repository
74
+ # @param analysis_id [Integer] ID of the code scanning analysis
75
+ #
76
+ # @return [Sawyer::Resource] Code Scanning Analysis
77
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository
78
+ def get_code_scanning_analysis(repo, analysis_id, options = {})
79
+ get "#{Repository.path repo}/code-scanning/analyses/#{analysis_id}", options
80
+ end
81
+
82
+ # List code scanning analyses for a repository
83
+ #
84
+ # @param repo [Integer, String, Repository, Hash] A GitHub repository
85
+ #
86
+ # @return [Array] List of Code Scanning Analyses
87
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#list-code-scanning-analyses-for-a-repository
88
+ def list_code_scanning_analysis(repo, options = {})
89
+ paginate "#{Repository.path repo}/code-scanning/analyses", options
90
+ end
91
+
92
+ # List instances of a code scanning alert
93
+ #
94
+ # @param repo [Integer, String, Repository, Hash] A GitHub repository
95
+ # @param alert_number [Integer] The number that identifies an alert
96
+ #
97
+ # @return [Array] List of Code Scanning Alerts
98
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#list-instances-of-a-code-scanning-alert
99
+ def list_instances_of_code_scanning_alert(repo, alert_number, options = {})
100
+ paginate "#{Repository.path repo}/code-scanning/alerts/#{alert_number}/instances", options
101
+ end
102
+
103
+ # Update a code scanning alert
104
+ #
105
+ # @param repo [Integer, String, Repository, Hash] A GitHub repository
106
+ # @param alert_number [Integer] The number that identifies an alert
107
+ # @param state [String] The reason for dismissing or closing the alert. Required when the state is dismissed
108
+ #
109
+ # @return [Sawyer::Resource] Code Scanning Alert information
110
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#update-a-code-scanning-alert
111
+ def update_code_scanning_alert(repo, alert_number, state, reason, comment = nil, options = {})
112
+ options[:state] = state
113
+ options[:dismissed_reason] = reason
114
+ options[:dismissed_comment] = comment if comment
115
+
116
+ patch "#{Repository.path repo}/code-scanning/alerts/#{alert_number}", options
117
+ end
118
+
119
+ # Gets a single code scanning alert
120
+ #
121
+ # @param repo [Integer, String, Repository, Hash] A GitHub repository
122
+ # @param alert_number [Integer] The number that identifies an alert
123
+ #
124
+ # @return [Sawyer::Resource] Code Scanning Alert
125
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-code-scanning-alert
126
+ def get_code_scanning_alert(repo, alert_number, options = {})
127
+ get "#{Repository.path repo}/code-scanning/alerts/#{alert_number}", options
128
+ end
129
+
130
+ # List code scanning alerts for a repository
131
+ #
132
+ # @param org [String] A GitHub organization
133
+ #
134
+ # @return [Array] Code Scanning Alert information
135
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-a-repository
136
+ def list_code_scanning_alerts_for_repo(repo, options = {})
137
+ paginate "#{Repository.path repo}/code-scanning/alerts", options
138
+ end
139
+
140
+ # List code scanning alerts for an organization
141
+ #
142
+ # @param org [String] A GitHub organization
143
+ #
144
+ # @return [Array] Code Scanning Alert information
145
+ # @see https://docs.github.com/en/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-organization
146
+ def list_code_scanning_alerts_for_org(org, options = {})
147
+ paginate "orgs/#{org}/code-scanning/alerts", options
148
+ end
149
+
12
150
  # Uploads SARIF data containing the results of a code scanning analysis
13
151
  #
14
152
  # @param repo [Integer, String, Repository, Hash] A GitHub repository
@@ -7,7 +7,7 @@ module Octokit
7
7
 
8
8
  # Current minor release.
9
9
  # @return [Integer]
10
- MINOR = 0
10
+ MINOR = 1
11
11
 
12
12
  # Current patch level.
13
13
  # @return [Integer]
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octokit
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wynn Netherland
8
8
  - Erik Michaels-Ober
9
9
  - Clint Shryock
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-06-10 00:00:00.000000000 Z
13
+ date: 2024-06-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
@@ -153,7 +153,7 @@ licenses:
153
153
  - MIT
154
154
  metadata:
155
155
  rubygems_mfa_required: 'true'
156
- post_install_message:
156
+ post_install_message:
157
157
  rdoc_options: []
158
158
  require_paths:
159
159
  - lib
@@ -168,8 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  - !ruby/object:Gem::Version
169
169
  version: 1.3.5
170
170
  requirements: []
171
- rubygems_version: 3.4.20
172
- signing_key:
171
+ rubygems_version: 3.0.3.1
172
+ signing_key:
173
173
  specification_version: 4
174
174
  summary: Ruby toolkit for working with the GitHub API
175
175
  test_files: []