Skip to content

Commit b8144c1

Browse files
Fix type error (#35)
1 parent c01c4d1 commit b8144c1

File tree

6 files changed

+18
-11
lines changed

6 files changed

+18
-11
lines changed

CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.13.1] - 2024-12-31
11+
12+
### Fixed
13+
14+
- Fix type error
15+
1016
## [1.13.0] - 2024-12-31
1117

1218
### Added
@@ -107,7 +113,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
107113
- Support for `https` endpoints (proto over http).
108114
- Update to node 20.x
109115

110-
[unreleased]: https://github.com/corentinmusard/otel-cicd-action/compare/v1.13.0...HEAD
116+
[unreleased]: https://github.com/corentinmusard/otel-cicd-action/compare/v1.13.1...HEAD
117+
[1.13.1]: https://github.com/corentinmusard/otel-cicd-action/compare/v1.13.0...v1.13.1
111118
[1.13.0]: https://github.com/corentinmusard/otel-cicd-action/compare/v1.12.1...v1.13.0
112119
[1.12.1]: https://github.com/corentinmusard/otel-cicd-action/compare/v1.12.0...v1.12.1
113120
[1.12.0]: https://github.com/corentinmusard/otel-cicd-action/compare/v1.11.0...v1.12.0

dist/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -68463,9 +68463,9 @@ function headCommitToAttributes(head_commit) {
6846368463
}
6846468464
function prsToAttributes(pullRequests, prLabels) {
6846568465
const attributes = {
68466-
"github.head_ref": pullRequests?.[0].head?.ref,
68467-
"github.base_ref": pullRequests?.[0].base?.ref,
68468-
"github.base_sha": pullRequests?.[0].base?.sha,
68466+
"github.head_ref": pullRequests?.[0]?.head?.ref,
68467+
"github.base_ref": pullRequests?.[0]?.base?.ref,
68468+
"github.base_sha": pullRequests?.[0]?.base?.sha,
6846968469
};
6847068470
for (let i = 0; pullRequests && i < pullRequests.length; i++) {
6847168471
const pr = pullRequests[i];

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"private": true,
33
"name": "otel-cicd-action",
44
"type": "module",
5-
"version": "1.13.0",
5+
"version": "1.13.1",
66
"description": "Github Action that export CI/CD workflows to any endpoint compatible with OpenTelemetry",
77
"scripts": {
88
"prepare": "husky",

src/tracing/job.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ function prsToAttributes(
127127
prLabels: Record<number, string[]>,
128128
) {
129129
const attributes: Attributes = {
130-
"github.head_ref": pullRequests?.[0].head?.ref,
131-
"github.base_ref": pullRequests?.[0].base?.ref,
132-
"github.base_sha": pullRequests?.[0].base?.sha,
130+
"github.head_ref": pullRequests?.[0]?.head?.ref,
131+
"github.base_ref": pullRequests?.[0]?.base?.ref,
132+
"github.base_sha": pullRequests?.[0]?.base?.sha,
133133
};
134134

135135
for (let i = 0; pullRequests && i < pullRequests.length; i++) {

0 commit comments

Comments
 (0)