Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5130345
Add logging for changed file detection in pull request creation
hawkeyexl Oct 25, 2024
2d9ee15
Enhance Git availability checks and improve warning messages
hawkeyexl Oct 25, 2024
e490237
Refactor git availability check to remove unnecessary cwd parameter
hawkeyexl Oct 25, 2024
e62dd86
debug
hawkeyexl Oct 25, 2024
bdba2d9
debug
hawkeyexl Oct 25, 2024
9825bd3
Remove debug statements and enhance Git version logging in main function
hawkeyexl Oct 25, 2024
5d7c291
debug
hawkeyexl Oct 25, 2024
0bbfc7a
Remove debug statements for Git version logging in main function
hawkeyexl Oct 25, 2024
7ddb24d
debug
hawkeyexl Oct 25, 2024
5bd51a0
debug
hawkeyexl Oct 25, 2024
339199d
d
hawkeyexl Oct 25, 2024
411e9e8
bump version
hawkeyexl Oct 25, 2024
db8596a
Merge remote-tracking branch 'refs/remotes/origin/rc' into rc
hawkeyexl Oct 25, 2024
50cbf1e
debug
hawkeyexl Oct 25, 2024
bbd4580
cleanup
hawkeyexl Oct 25, 2024
467216f
refactor: improve error handling for git status check
hawkeyexl Oct 26, 2024
e7f2ed4
Merge branch 'main' into rc
hawkeyexl Oct 26, 2024
fdcfd4f
Merge branch 'main' into rc
hawkeyexl Apr 24, 2025
d79ab41
Add Doc Detective as an installed dependency
hawkeyexl Apr 24, 2025
d2e107e
Remove command input from workflows and update version handling
hawkeyexl Apr 24, 2025
5e99f71
Add local GitHub Actions workflow for Doc Detective
hawkeyexl Apr 24, 2025
a28f49e
Update package.json configuration
hawkeyexl Apr 24, 2025
301b5e8
Add initial test specification file
hawkeyexl Apr 24, 2025
bf3019e
Refactor .doc-detective.json configuration
hawkeyexl Apr 24, 2025
2d4058b
Update warning message for Ubuntu runners in main function
hawkeyexl Apr 24, 2025
8fa8458
Update .doc-detective.json configuration
hawkeyexl Apr 24, 2025
a9d1bd3
Fixed output splitting
hawkeyexl Apr 24, 2025
5a00e18
Updated dependencies/version
hawkeyexl Apr 24, 2025
d547747
Reverted version handling
hawkeyexl Apr 24, 2025
2d2bd62
Make version input optional in action.yml
hawkeyexl Apr 24, 2025
5dcf908
Update input paths in test workflow
hawkeyexl Apr 25, 2025
aeab039
Refactor documentation comments in doc-content-inline-tests.md
hawkeyexl Apr 25, 2025
8aec1dd
- Add 'runTests' command for version inputs starting with 'v2'.
hawkeyexl May 7, 2025
e069912
Restored version input
hawkeyexl May 7, 2025
24f2f48
Update name
hawkeyexl May 7, 2025
b65a3aa
Fixed version check string
hawkeyexl May 7, 2025
7bc0622
Merge branch 'main' into rc
hawkeyexl May 7, 2025
3be5be0
Rebuild
hawkeyexl May 7, 2025
225967f
Fixed test paths
hawkeyexl May 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run local action
name: Run branch action

on:
workflow_dispatch:
Expand All @@ -7,6 +7,10 @@ on:
description: runner
required: true
default: ubuntu-latest
version:
description: version
required: false
default: latest
working_directory:
description: working_directory
required: false
Expand Down Expand Up @@ -60,7 +64,7 @@ jobs:
id: dd
with:
working_directory: ${{ github.event.inputs.working_directory }}
command: ${{ github.event.inputs.command }}
version: ${{ github.event.inputs.version }}
config: ${{ github.event.inputs.config }}
input: ${{ github.event.inputs.input }}
create_pr_on_change: ${{ github.event.inputs.create_pr_on_change }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
id: dd
with:
config: ./artifacts/.doc-detective.json
input: doc-content-inline-tests.md
input: ./artifacts/doc-content-inline-tests.md

fail-tests:
runs-on: ${{ matrix.os }}
Expand All @@ -42,5 +42,5 @@ jobs:
continue-on-error: true
with:
config: ./artifacts/.doc-detective.json
input: doc-content-inline-tests-fail.md
input: ./artifacts/doc-content-inline-tests-fail.md
exit_on_fail: true
8 changes: 7 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1882,6 +1882,7 @@ class Context {
this.action = process.env.GITHUB_ACTION;
this.actor = process.env.GITHUB_ACTOR;
this.job = process.env.GITHUB_JOB;
this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
Expand Down Expand Up @@ -31841,13 +31842,18 @@ async function main() {
}
// Get the inputs
const version = core.getInput("version");
const dd = version ? `doc-detective@${version}` : "doc-detective";
const dd = `doc-detective@${version}`;
const cwd = core.getInput("working_directory");
const config = core.getInput("config");
const input = core.getInput("input");

// Compile command
let compiledCommand = `npx ${dd}`;
// If v2, add the 'runTests' command
if (version.startsWith("2")) {
compiledCommand += " runTests";
}
// Add the options
if (config) compiledCommand += ` --config ${config}`;
if (input) compiledCommand += ` --input ${input}`;
const outputPath = path.resolve(
Expand Down
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ async function main() {

// Compile command
let compiledCommand = `npx ${dd}`;
// If v2, add the 'runTests' command
if (version.startsWith("2")) {
compiledCommand += " runTests";
}
// Add the options
if (config) compiledCommand += ` --config ${config}`;
if (input) compiledCommand += ` --input ${input}`;
const outputPath = path.resolve(
Expand Down
20 changes: 12 additions & 8 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "doc-detective-github-action",
"version": "1.3.0",
"version": "1.3.1",
"description": "Validate doc content by treating docs as testable assertions for a product.",
"main": "index.js",
"scripts": {
Expand All @@ -22,7 +22,7 @@
"dependencies": {
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0"
"@actions/github": "^6.0.1"
},
"devDependencies": {
"@vercel/ncc": "^0.38.3",
Expand Down
Loading