Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 #233

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft

v2 #233

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
698db85
refactor: move main
Codex- Oct 5, 2024
bfa4e05
refactor: run from new main
Codex- Oct 5, 2024
65a770f
refactor: lift some prework to main
Codex- Oct 5, 2024
f5ca229
refactor: rename api gets to fetches
Codex- Oct 5, 2024
967c782
chore: resolve some lint warnings
Codex- Oct 5, 2024
8d35016
refactor: lift wrapping try/catch to main
Codex- Oct 5, 2024
ab359a8
refactor: add ts-reset
Codex- Oct 5, 2024
5fdef37
fix: prevent createRequire clashes
Codex- Oct 5, 2024
2c228b6
refactor: start using result types for retryOnError
Codex- Oct 6, 2024
7e02397
docs: update api doc links
Codex- Oct 6, 2024
1139b59
chore: add knip and address findings
Codex- Oct 6, 2024
b8ace72
refactor: use result types for flow control
Codex- Oct 26, 2024
1f8af1c
refactor: remove passing action config into getWorkflowRunResult
Codex- Oct 26, 2024
c551431
fix: prevent extra iterations occurring on fetchWorkflowRunActiveJobU…
Codex- Oct 26, 2024
95529d9
fix: job logging indentation on fetchWorkflowRunFailedJobs
Codex- Oct 26, 2024
8ba991d
test: add logging snapshots to api tests
Codex- Oct 26, 2024
4646208
test: cover missing cases for action config parsing and assert logging
Codex- Oct 26, 2024
1777a67
chore: exclude test mocks from code coverage
Codex- Oct 26, 2024
0b2a80b
test: add getWorkflowRunStatusResult tests
Codex- Oct 26, 2024
af8bba9
test: fix bug in logging assertions
Codex- Oct 27, 2024
10f7ad3
refactor: handleActionFailure reworked to set failure before logging
Codex- Nov 6, 2024
ac89699
refactor: rework some types
Codex- Nov 6, 2024
a433696
refactor: Request users to open issues if they encounter an unhandled…
Codex- Nov 24, 2024
450c1f7
refactor: finish handling and testing results for runs
Codex- Nov 24, 2024
d158d8f
refactor: main should fail for non-success conclusions
Codex- Nov 24, 2024
3243d9f
chore: bump dependencies
Codex- Nov 24, 2024
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
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,16 @@ jobs:
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
knip-report:
if: ${{ github.event_name == 'pull_request' }}
needs: [build]
runs-on: ubuntu-latest
permissions:
checks: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: pnpm i
- uses: codex-/knip-reporter@v2
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dist
lib
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ The permissions required for this action to function correctly are:

For the sake of transparency please note that this action uses the following API calls:

- [Get a workflow run](https://docs.github.com/en/rest/reference/actions#get-a-workflow-run)
- [Get a workflow run](https://docs.github.com/en/rest/actions/workflow-runs#get-a-workflow-run)
- GET `/repos/{owner}/{repo}/actions/runs/{run_id}`
- Permissions:
- `repo`
- `actions:read`
- [List jobs for a workflow run](https://docs.github.com/en/rest/reference/actions#list-jobs-for-a-workflow-run)
- [List jobs for a workflow run](https://docs.github.com/en/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run)
- GET `/repos/{owner}/{repo}/actions/runs/{run_id}/jobs`
- Permissions:
- `repo`
Expand Down
4 changes: 2 additions & 2 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import { analyzeMetafile, build } from "esbuild";
// Ensure require is properly defined: https://github.com/evanw/esbuild/issues/1921
banner: {
js:
"import { createRequire } from 'module';\n" +
"const require = createRequire(import.meta.url);",
"import { createRequire as __await_remote_run_cr } from 'node:module';\n" +
"const require = __await_remote_run_cr(import.meta.url);",
},
});

Expand Down
9 changes: 5 additions & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ export default tsEslint.config(
},
{
ignores: [
"**/coverage",
"**/dist",
"**/esbuild.config.mjs",
"**/vitest.config.ts",
"coverage",
"dist",
"esbuild.config.mjs",
"knip.ts",
"vitest.config.ts",
],
},
{
Expand Down
15 changes: 15 additions & 0 deletions knip.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { KnipConfig } from "knip";

const config: KnipConfig = {
ignore: ["dist/**"],
ignoreDependencies: [
// Used in eslint.config.mjs
"eslint-plugin-github",
"eslint-plugin-import",
// Required by eslint-plugin-import-x
"@typescript-eslint/parser",
"eslint-import-resolver-typescript",
],
};

export default config;
33 changes: 18 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"build": "pnpm run build:types && pnpm run build:bundle",
"build:bundle": "node ./esbuild.config.mjs",
"build:types": "tsc",
"format:check": "prettier --check **/*.ts",
"format:check": "prettier --check **/*.*",
"format": "pnpm run format:check --write",
"lint": "eslint",
"lint:fix": "pnpm run lint --fix",
"release": "release-it",
"test": "vitest",
"test:coverage": "vitest --coverage"
"test:coverage": "vitest --coverage",
"knip": "knip"
},
"repository": {
"type": "git",
Expand All @@ -32,26 +32,29 @@
"@actions/github": "^6.0.0"
},
"devDependencies": {
"@eslint/compat": "^1.2.2",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.13.0",
"@eslint/compat": "^1.2.3",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.15.0",
"@opentf/std": "^0.13.0",
"@total-typescript/ts-reset": "^0.6.1",
"@types/eslint__js": "^8.42.3",
"@types/node": "^20.17.4",
"@typescript-eslint/eslint-plugin": "^8.12.2",
"@typescript-eslint/parser": "^8.12.2",
"@vitest/coverage-v8": "^2.1.4",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"@vitest/coverage-v8": "^2.1.5",
"chalk": "^5.3.0",
"changelogithub": "^0.13.11",
"esbuild": "^0.24.0",
"eslint": "^9.13.0",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-github": "^5.0.2",
"eslint-plugin-github": "^5.1.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-import-x": "^4.4.0",
"eslint-plugin-import-x": "^4.4.3",
"knip": "^5.37.2",
"prettier": "3.3.3",
"typescript": "^5.6.3",
"typescript-eslint": "^8.12.2",
"vitest": "^2.1.4"
"typescript": "^5.7.2",
"typescript-eslint": "^8.15.0",
"vitest": "^2.1.5"
}
}
Loading
Loading