terraspace_vcs_github 0.1.0 → 0.1.1
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/CHANGELOG.md +4 -0
- data/lib/terraspace_vcs_github/interface.rb +13 -2
- data/lib/terraspace_vcs_github/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d175f189b2351675e299a188ee8464bd97ecfb1fef4064f1752cbb2138633b75
|
4
|
+
data.tar.gz: 5ced834df42981c2d3c7770eb036ecdab58c7d3b1890b8fe92d22b9845d84204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00ce177b131bb45e29c92780a2024f31399272700b96327d1fe3ff1065f172a04ad8cf3d5e0b235425b8bdffeff959c07644b4d5c2ebda737141f077bb96b9fc
|
7
|
+
data.tar.gz: a2241e1f0c461d8363b276e8a70208066ce97cd66e05a1ce638b193cec38eb2d88c43e20c33cea351aa3699a67ddbaa8f76c50407190d10afd5546f846f10f9b
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
## [0.1.1] - 2022-07-13
|
7
|
+
- [#1](https://github.com/boltops-tools/terraspace_vcs_github/pull/1) handle not found when token possibly doesnt have access to repo
|
8
|
+
- update logger debug adding comment message
|
9
|
+
|
6
10
|
## [0.1.0] - 2022-07-07
|
7
11
|
|
8
12
|
- Initial release
|
@@ -10,7 +10,7 @@ module TerraspaceVcsGithub
|
|
10
10
|
def comment(body)
|
11
11
|
return unless github_token?
|
12
12
|
|
13
|
-
logger.debug "Adding comment to full_repo #{full_repo}
|
13
|
+
logger.debug "Adding comment to full_repo #{full_repo} pr_number #{pr_number}"
|
14
14
|
comments = client.issue_comments(full_repo, pr_number)
|
15
15
|
found_comment = comments.find do |comment|
|
16
16
|
comment.body.starts_with?(MARKER)
|
@@ -22,7 +22,18 @@ module TerraspaceVcsGithub
|
|
22
22
|
client.add_comment(full_repo, pr_number, body)
|
23
23
|
end
|
24
24
|
rescue Octokit::Unauthorized => e
|
25
|
-
|
25
|
+
# pretty long GitHub error message. so on separate line
|
26
|
+
logger.info <<~EOL
|
27
|
+
WARN: #{e.message}
|
28
|
+
Unable to create pull request comment. Please double check your github token.
|
29
|
+
EOL
|
30
|
+
rescue Octokit::NotFound => e # from client.issue_comments(full_repo, pr_number)
|
31
|
+
# can occur when user token does not have access to the repo
|
32
|
+
logger.info <<~EOL
|
33
|
+
WARN: #{e.message}
|
34
|
+
Unable to list comments and create pull request comment.
|
35
|
+
This can happen when user does not have access to the repo. Please double check your github token.
|
36
|
+
EOL
|
26
37
|
end
|
27
38
|
|
28
39
|
def client
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terraspace_vcs_github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday-retry
|