Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .well-known/funding-manifest-urls
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://vale.sh/funding.json
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
> :octocat: The official GitHub Action for Vale -- install, manage, and run Vale
> with ease.

> [!IMPORTANT]
> **This repository has moved to [`vale-cli/vale-action`](https://github.com/vale-cli/vale-action).**
>
> The `errata-ai` organization has been renamed to `vale-cli`. You must update your workflows to continue using the action:
>
> ```diff
> - uses: errata-ai/vale-action@v2
> + uses: vale-cli/vale-action@v2
> ```

<p align="center">
<img width="50%" alt="A demo screenshot." src="https://user-images.githubusercontent.com/8785025/85236358-272d3680-b3d2-11ea-8793-0f45cb70189a.png">
</p>
Expand All @@ -21,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: errata-ai/vale-action@v2.1.1
- uses: vale-cli/vale-action@v2.1.1
```

> [!TIP]
Expand Down Expand Up @@ -75,7 +85,7 @@ To add an input, edit your workflow file and add the `with` key to the `uses`
block. For example:

```yaml
- uses: errata-ai/vale-action@v2.1.1
- uses: vale-cli/vale-action@v2.1.1
with:
version: 2.17.0
```
Expand All @@ -84,7 +94,8 @@ block. For example:

> NOTE: The provided version must be `>= 2.16.0`.

Specify the Vale CLI version to use.
Specify the Vale CLI version to use. If `none`, any preinstalled version of vale
is used.

```yaml
with:
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ inputs:
default: ${{ github.token }}

runs:
using: "node20"
using: "node24"
main: "lib/main.js"
29 changes: 19 additions & 10 deletions lib/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
Expand All @@ -32,7 +42,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.get = exports.parse = void 0;
exports.parse = parse;
exports.get = get;
const core = __importStar(require("@actions/core"));
const exec = __importStar(require("@actions/exec"));
const fs = __importStar(require("fs"));
Expand All @@ -46,7 +57,6 @@ function parse(flags) {
// TODO: need to simulate bash?
return flags.split(/\s+/);
}
exports.parse = parse;
/**
* Log debugging information to `stdout`.
*
Expand Down Expand Up @@ -125,4 +135,3 @@ function get(tok, dir) {
};
});
}
exports.get = get;
51 changes: 41 additions & 10 deletions lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
Expand All @@ -35,15 +45,38 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.installReviewDog = exports.installLint = void 0;
exports.installLint = installLint;
exports.installReviewDog = installReviewDog;
const core = __importStar(require("@actions/core"));
const exec = __importStar(require("@actions/exec"));
const tc = __importStar(require("@actions/tool-cache"));
const node_fetch_1 = __importDefault(require("node-fetch"));
const path_1 = __importDefault(require("path"));
const releases = 'https://github.com/errata-ai/vale/releases/download';
const last = 'https://github.com/errata-ai/vale/releases/latest/';
function lookupLint() {
return __awaiter(this, void 0, void 0, function* () {
let path = '';
let stderr = '';
let resp = yield exec.exec('which', ['vale'], {
listeners: {
stdout: (buffer) => (path = buffer.toString().trim()),
stderr: (data) => (stderr += data.toString())
}
});
if (resp !== 0) {
core.setFailed(stderr);
}
core.info(`Using the install at ${path}`);
return path;
});
}
function installLint(version) {
return __awaiter(this, void 0, void 0, function* () {
if (version === 'none') {
core.info(`Assuming a version of vale is already available.`);
return yield lookupLint();
}
core.info(`Installing Vale version '${version}' ...`);
if (version === 'latest') {
const response = yield (0, node_fetch_1.default)(last);
Expand All @@ -64,7 +97,6 @@ function installLint(version) {
return lintPath;
});
}
exports.installLint = installLint;
function installReviewDog(version, url) {
return __awaiter(this, void 0, void 0, function* () {
core.info(`Installing ReviewDog version '${version}' ...`);
Expand All @@ -83,4 +115,3 @@ function installReviewDog(version, url) {
return reviewdogPath;
});
}
exports.installReviewDog = installReviewDog;
27 changes: 18 additions & 9 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
Expand All @@ -32,7 +42,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.run = void 0;
exports.run = run;
const core = __importStar(require("@actions/core"));
const exec = __importStar(require("@actions/exec"));
const path = __importStar(require("path"));
Expand Down Expand Up @@ -103,7 +113,6 @@ function run(actionInput) {
}
});
}
exports.run = run;
function main() {
return __awaiter(this, void 0, void 0, function* () {
try {
Expand Down
1 change: 0 additions & 1 deletion node_modules/.bin/node-which

This file was deleted.

2 changes: 1 addition & 1 deletion node_modules/.bin/prettier

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/rimraf

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/uuid

This file was deleted.

Loading