@action-badges/core
Advanced tools
Comparing version 0.1.1 to 0.2.0
# Changelog | ||
## 📦 0.2.0 | ||
* Allow implementations of `BaseAction` to declare they do not want to | ||
write anything by returning `null` or `undefined` from `render()`. | ||
* Update packages | ||
## 📦 0.1.1 | ||
@@ -4,0 +10,0 @@ |
@@ -21,3 +21,3 @@ # `action-badges/core` Github Action | ||
- name: Make Black Code Style badge | ||
uses: action-badges/core@0.1.1 | ||
uses: action-badges/core@0.2.0 | ||
with: | ||
@@ -33,3 +33,3 @@ label: code style | ||
- name: Make Latest Commit badge | ||
uses: action-badges/core@0.1.1 | ||
uses: action-badges/core@0.2.0 | ||
with: | ||
@@ -36,0 +36,0 @@ label: latest commit |
@@ -12,2 +12,3 @@ # `@action-badges/core` NPM Package | ||
- `async render()` returns an object which can contain any of the keys `label`, `labelColor`, `message`, `messageColor`, `style`. It should usually contain at least a `message` key. | ||
- If `async render()` returns `null` or `undefined`, no SVG will be written. | ||
- Your javascript action inherits all of the default Yaml [parameters](https://github.com/action-badges/core/blob/main/docs/github-action.md#parameters) but you can define your own too. Parameters explicitly specified in yaml take precedence over the values returned by `async render()`, allowing users to customise the behaviour of badges. | ||
@@ -14,0 +15,0 @@ |
{ | ||
"name": "@action-badges/core", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Create SVG badges with GitHub actions", | ||
@@ -30,3 +30,3 @@ "main": "src/index.js", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-mocha": "^8.1.0", | ||
"eslint-plugin-mocha": "^9.0.0", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
@@ -36,3 +36,3 @@ "mocha": "^8.4.0", | ||
"prettier": "^2.3.0", | ||
"sinon": "^10.0.0" | ||
"sinon": "^11.1.0" | ||
}, | ||
@@ -39,0 +39,0 @@ "engines": { |
@@ -5,3 +5,7 @@ # action-badges/core | ||
[![Run tests](https://github.com/action-badges/core/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/action-badges/core/actions/workflows/test.yml) [![Build Dist](https://github.com/action-badges/core/actions/workflows/build-dist.yml/badge.svg?branch=main)](https://github.com/action-badges/core/actions/workflows/build-dist.yml) | ||
![build](https://raw.githubusercontent.com/action-badges/core/badges/.badges/main/build-status.svg) | ||
![coverage](https://raw.githubusercontent.com/action-badges/core/badges/.badges/main/coverage.svg) | ||
![version](https://raw.githubusercontent.com/action-badges/core/badges/.badges/main/package-version.svg) | ||
![license](https://raw.githubusercontent.com/action-badges/core/badges/.badges/main/package-license.svg) | ||
![node](https://raw.githubusercontent.com/action-badges/core/badges/.badges/main/package-node-version.svg) | ||
@@ -8,0 +12,0 @@ Action badges allows you to create custom badges using github actions and host them in your own github repo. |
@@ -72,2 +72,5 @@ "use strict"; | ||
const rendered = await obj.render(); | ||
if (rendered == null) { | ||
return; | ||
} | ||
@@ -74,0 +77,0 @@ try { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19524
197
24