terraspace_vcs_github 0.1.0 → 0.1.1

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: a7ac3d8604481c49ee75e456b85bc14099cf8c1537290f67a24e92771c4a0330
4
- data.tar.gz: 0a950de5040a0d34b5c2c6b933326dc315c28b99304bc8144aa5f19fbccad202
3
+ metadata.gz: d175f189b2351675e299a188ee8464bd97ecfb1fef4064f1752cbb2138633b75
4
+ data.tar.gz: 5ced834df42981c2d3c7770eb036ecdab58c7d3b1890b8fe92d22b9845d84204
5
5
  SHA512:
6
- metadata.gz: 2cea54f44b70017a45d7227e543b136ddec6ba971d6859ea87bdd66a37b9faf8b97e765434b20e9aec83c8c4ccf0b3bc39ba03da100f8cebca3f60927a4bc749
7
- data.tar.gz: 8c22344419f4f9df27f10215981b970bf1f397b0f9aa6572dd511807af0d3ebd7edb019f38b174764acaee0ba909ba2ecd9c5f53d66e76b46b55f99cf890f10f
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} number #{pr_number}"
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
- logger.info "WARN: #{e.message}. Unable to create pull request comment. Please double check your github token"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TerraspaceVcsGithub
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
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.0
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-07 00:00:00.000000000 Z
11
+ date: 2022-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday-retry