s1seven / schema-tools

Tools to create, validate and render certificates using Material Identity JSON schemas
https://materialidentity.org/
Apache License 2.0
1 stars 1 forks source link

ci: only run danger workflow on PRs #187

Closed eamon0989 closed 1 year ago

eamon0989 commented 1 year ago

Description

With the previous PR - https://github.com/s1seven/schema-tools/pull/186, we introduced danger.js to automate some parts of code reviews. It works as expected, but when merging to main it also runs and throws a type error as the danger.git object is not populated (it is only populated for PRs). This PR fixes the failing CI on merge to main by adding a condition that it only run when branch != main. It also adds some extra protections to dangerfile.ts.

Type of change

Checklist:

nx-cloud[bot] commented 1 year ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 2bee1feaaf3d0f4a49334eeb88c52c9c4eda0255. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 4 targets - [`nx affected --target=test:cov`](https://cloud.nx.app/runs/KgQKCnZ9IG) - [`nx affected --target=test:browser`](https://cloud.nx.app/runs/OXUxfj0AaI) - [`nx affected --target=build`](https://cloud.nx.app/runs/kkvXNVA3fV) - [`nx run-many --target=lint --all`](https://cloud.nx.app/runs/ZwY9wdJQns)

Sent with 💌 from NxCloud.

github-actions[bot] commented 1 year ago
Warnings
:warning: :exclamation: checkboxes (1)

(1) : There are 3 empty checkboxes, have you updated the checklist?

Generated by :no_entry_sign: dangerJS against 2bee1feaaf3d0f4a49334eeb88c52c9c4eda0255

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information