githubchart 3.4.0 → 4.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a38d6c19bc55d161fd785701d9580bdff7e8b80596b18d0f48ec91fe261ca440
4
- data.tar.gz: 485df1ef783421cb9efd765c314e676f194b59a08ec77b4b6d50a0e198e17011
3
+ metadata.gz: 39a80fbfd70eb439076199998142ec5ac4e8a60494d3a160bcfc67058d200935
4
+ data.tar.gz: 4108161a4d71634fb48ba98bdb5fb85284224b72cb006874278df8d1e0d120fc
5
5
  SHA512:
6
- metadata.gz: 37d1f4e76a675936202808bd286d048a6a19fa1c4859f3cf036e9beedb5cd4b7cd7b410fbb6c4f035b521c52dd509a01e77c5f596040faa5db558e60755aa8d1
7
- data.tar.gz: eb58e9dee76e7f219954c36e0d6de5aa0ceec207ddf69c1833d19bb81c0eb9e34e76cf4101283833c22db5ecfaadc2bd5cf41b1ff4fb0c9201bf0f6a487196d7
6
+ metadata.gz: a65c9fed6432216d8c48391e7124558a1dc87c67e343e684300a1d56e351809440261d366ecf6996618eaccec8f116bdfe52ca15eebbafe86c2fdbbb09def2d9
7
+ data.tar.gz: 012bd1c3a898970100667837e9ee1287314d5bb2ce9166e399776d41533e7d287906b13fa9b2b73f16f73ab8e96ead2e2899ebbd9dc0fde2abaf3350ffaae386
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+
5
+ URL="https://exporter.akerl.app/metric"
6
+ AUTH="Authorization: Bearer $EXPORTER_TOKEN"
7
+ if [[ "$JOB_STATUS" == "success" ]] ; then
8
+ VALUE=1
9
+ else
10
+ VALUE=0
11
+ fi
12
+ BODY="{\"name\":\"gh/${GITHUB_REPOSITORY}\",\"metrics\":[{\"name\":\"ghactions\",\"type\":\"gauge\",\"tags\":{\"repo\":\"${GITHUB_REPOSITORY}\"},\"value\":\"${VALUE}\"}]}"
13
+
14
+ echo "$BODY"
15
+
16
+ curl -i -XPOST -d "$BODY" -H"$AUTH" "$URL"
@@ -1,7 +1,12 @@
1
+ ---
1
2
  name: Build
2
- on:
3
- pull_request:
3
+ 'on':
4
4
  push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - "**"
9
+ pull_request_target:
5
10
  jobs:
6
11
  build:
7
12
  name: Build
@@ -23,24 +28,10 @@ jobs:
23
28
  if: github.ref_type == 'tag'
24
29
  run: bundle exec rake release
25
30
  env:
26
- GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
27
- - name: Post to a Slack channel
28
- if: ${{ failure() }}
29
- uses: slackapi/slack-github-action@v1.23.0
31
+ GEM_HOST_API_KEY: "${{ secrets.GEM_HOST_API_KEY }}"
32
+ - name: Post to hook-exporter
33
+ run: "./.github/exporter.sh"
30
34
  env:
31
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
32
- SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
33
- with:
34
- payload: |
35
- {
36
- "text": "*${{ github.repository }}*\nBuild failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
37
- "blocks": [
38
- {
39
- "type": "section",
40
- "text": {
41
- "type": "mrkdwn",
42
- "text": "*${{ github.repository }}*\nBuild failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
43
- }
44
- }
45
- ]
46
- }
35
+ EXPORTER_TOKEN: "${{ secrets.EXPORTER_TOKEN }}"
36
+ JOB_STATUS: "${{ job.status }}"
37
+ if: always() && github.ref == 'refs/heads/main'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 4.0.0 / 2023-07-18
2
+
3
+ * [BUGFIX] Update GithubStats dep to use new Github.com format for table
4
+
1
5
  # 3.4.0 / 2023-01-08
2
6
 
3
7
  * [ENHANCEMENT] Update GithubStats dep
data/githubchart.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.files = `git ls-files`.split
16
16
  s.executables = ['githubchart']
17
17
 
18
- s.add_runtime_dependency 'githubstats', '~> 3.3.0'
18
+ s.add_runtime_dependency 'githubstats', '~> 4.0.1'
19
19
  s.add_runtime_dependency 'matrix', '~> 0.4.2'
20
20
  s.add_runtime_dependency 'svgplot', '~> 1.0.0'
21
21
 
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Define the version
3
3
  module GithubChart
4
- VERSION = '3.4.0'.freeze
4
+ VERSION = '4.0.0'.freeze
5
5
  end
data/lib/githubchart.rb CHANGED
@@ -83,7 +83,7 @@ module GithubChart
83
83
 
84
84
  ##
85
85
  # Convert the data into a matrix of weeks
86
- # The fill value is used to pad the front and backdd
86
+ # The fill value is used to pad the front and back
87
87
 
88
88
  def matrix(fill_value = -1)
89
89
  Matrix[*@stats.pad(fill_value).each_slice(7).to_a.transpose]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: githubchart
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-08 00:00:00.000000000 Z
11
+ date: 2023-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: githubstats
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.3.0
19
+ version: 4.0.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 3.3.0
26
+ version: 4.0.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: matrix
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -74,6 +74,7 @@ executables:
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
+ - ".github/exporter.sh"
77
78
  - ".github/workflows/build.yml"
78
79
  - ".gitignore"
79
80
  - ".rspec"