@dougefresh/ci 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/actions/jobtaker/action.yml +29 -0
- package/.github/additional-prompt.md +62 -0
- package/.github/workflows/action-review.yml +46 -3
- package/.github/workflows/pr-review.yml +7 -41
- package/AGENTS.md +15 -0
- package/action.yml +18 -2
- package/{biome.jsonc → biome.json} +1 -1
- package/package.json +3 -1
- package/pre-commit +1 -1
- package/prompt-template.md +180 -0
- package/scripts/bump-version.ts +2 -2
- package/scripts/generate-rust.ts +2 -2
- package/src/defaults.ts +119 -0
- package/src/index.ts +27 -177
- package/src/types.ts +81 -0
- package/.github/copilot-instructions.md +0 -118
- package/dist/ai.d.ts +0 -11
- package/dist/ai.d.ts.map +0 -1
- package/dist/ai.js +0 -52
- package/dist/ai.js.map +0 -1
- package/dist/index.d.ts +0 -106
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -213
- package/dist/index.js.map +0 -1
- package/src/ai.ts +0 -61
package/src/index.ts
CHANGED
|
@@ -1,167 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
interface BaseJob {
|
|
19
|
-
if: boolean | string;
|
|
20
|
-
continueOnError: boolean | string;
|
|
21
|
-
run?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface Matrix {
|
|
25
|
-
os: Arch[];
|
|
26
|
-
toolchains: string[];
|
|
27
|
-
features: string[];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
interface Fmt extends BaseJob {}
|
|
31
|
-
interface SemVer extends BaseJob {}
|
|
32
|
-
interface Hack extends BaseJob {}
|
|
33
|
-
interface CargoSort extends BaseJob {}
|
|
34
|
-
interface DocCheck extends BaseJob {}
|
|
35
|
-
interface Dependencies extends BaseJob {}
|
|
36
|
-
interface Extra extends BaseJob {
|
|
37
|
-
name: string;
|
|
38
|
-
matrix: Matrix;
|
|
39
|
-
}
|
|
40
|
-
interface Sanitizers {
|
|
41
|
-
enabled: boolean;
|
|
42
|
-
address: BaseJob;
|
|
43
|
-
leak: BaseJob;
|
|
44
|
-
thread: BaseJob;
|
|
45
|
-
}
|
|
46
|
-
interface Clippy extends BaseJob {
|
|
47
|
-
flags: string;
|
|
48
|
-
matrix: Matrix;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
interface Coverage extends BaseJob {
|
|
52
|
-
matrix: Matrix;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
interface RustJobs {
|
|
56
|
-
clippy: Clippy;
|
|
57
|
-
coverage: Coverage;
|
|
58
|
-
cargoSort: CargoSort;
|
|
59
|
-
dependencies: Dependencies;
|
|
60
|
-
docCheck: DocCheck;
|
|
61
|
-
fmt: Fmt;
|
|
62
|
-
hack: Hack;
|
|
63
|
-
sanitizers: Sanitizers;
|
|
64
|
-
semver: SemVer;
|
|
65
|
-
extra: Extra;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
interface Release {
|
|
69
|
-
bin: boolean;
|
|
70
|
-
publish: boolean;
|
|
71
|
-
debian: boolean;
|
|
72
|
-
profile: string;
|
|
73
|
-
os: Arch[];
|
|
74
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_AI,
|
|
3
|
+
DEFAULT_CARGO_SORT,
|
|
4
|
+
DEFAULT_CLIPPY,
|
|
5
|
+
DEFAULT_COVERAGE,
|
|
6
|
+
DEFAULT_DEPENDENCIES,
|
|
7
|
+
DEFAULT_DOC_CHECK,
|
|
8
|
+
DEFAULT_EXTRA,
|
|
9
|
+
DEFAULT_FMT,
|
|
10
|
+
DEFAULT_HACK,
|
|
11
|
+
DEFAULT_SANITIZERS,
|
|
12
|
+
DEFAULT_SEMVER,
|
|
13
|
+
} from './defaults';
|
|
14
|
+
import { type AiJob, Arch, type Clippy, type Global, type Release, type RustJobs } from './types';
|
|
15
|
+
|
|
16
|
+
export * from './types';
|
|
75
17
|
|
|
76
18
|
export const JobDefaults: RustJobs = {
|
|
77
|
-
fmt:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if: true,
|
|
88
|
-
continueOnError: false,
|
|
89
|
-
run: 'cargo hack --feature-powerset check',
|
|
90
|
-
} as Hack,
|
|
91
|
-
docCheck: {
|
|
92
|
-
if: true,
|
|
93
|
-
continueOnError: false,
|
|
94
|
-
run: 'cargo +nightly docs-rs',
|
|
95
|
-
} as DocCheck,
|
|
96
|
-
cargoSort: {
|
|
97
|
-
if: true,
|
|
98
|
-
continueOnError: false,
|
|
99
|
-
run: 'if [ -f ./scripts/cargo-sort.sh ]; then\n ./scripts/cargo-sort.sh\nelse\n cargo sort -c -g\nfi\n',
|
|
100
|
-
} as CargoSort,
|
|
101
|
-
dependencies: {
|
|
102
|
-
if: true,
|
|
103
|
-
continueOnError: false,
|
|
104
|
-
run: 'cargo machete --with-metadata',
|
|
105
|
-
} as Dependencies,
|
|
106
|
-
sanitizers: {
|
|
107
|
-
enabled: true,
|
|
108
|
-
address: {
|
|
109
|
-
if: true,
|
|
110
|
-
continueOnError: false,
|
|
111
|
-
run: 'cargo test --lib --tests --no-fail-fast --target x86_64-unknown-linux-gnu -- --no-capture',
|
|
112
|
-
},
|
|
113
|
-
leak: {
|
|
114
|
-
if: true,
|
|
115
|
-
continueOnError: false,
|
|
116
|
-
run: 'cargo test --target x86_64-unknown-linux-gnu -- --no-capture',
|
|
117
|
-
},
|
|
118
|
-
thread: {
|
|
119
|
-
if: false,
|
|
120
|
-
continueOnError: false,
|
|
121
|
-
run: 'cargo test --target x86_64-unknown-linux-gnu -- --test-threads=1',
|
|
122
|
-
},
|
|
123
|
-
} as Sanitizers,
|
|
124
|
-
|
|
125
|
-
coverage: {
|
|
126
|
-
if: true,
|
|
127
|
-
continueOnError: false,
|
|
128
|
-
matrix: {
|
|
129
|
-
os: [Arch.ARM64],
|
|
130
|
-
toolchains: ['stable'],
|
|
131
|
-
features: ['default'],
|
|
132
|
-
},
|
|
133
|
-
run: `
|
|
134
|
-
cmd="cargo llvm-cov \${LLVM_ARGS} --locked --lcov --output-path lcov-\${FEATURES}.info --no-fail-fast"
|
|
135
|
-
if [ "$FEATURES" == "default" ]; then
|
|
136
|
-
$cmd -- --no-capture $CARGO_ARGS
|
|
137
|
-
else
|
|
138
|
-
$cmd --features "$FEATURES" -- --no-capture $CARGO_ARGS
|
|
139
|
-
fi
|
|
140
|
-
`,
|
|
141
|
-
} as Coverage,
|
|
142
|
-
|
|
143
|
-
clippy: {
|
|
144
|
-
if: true,
|
|
145
|
-
continueOnError: false,
|
|
146
|
-
run: '',
|
|
147
|
-
flags: '',
|
|
148
|
-
matrix: {
|
|
149
|
-
os: [Arch.ARM64],
|
|
150
|
-
toolchains: ['stable'],
|
|
151
|
-
features: ['default'],
|
|
152
|
-
},
|
|
153
|
-
} as Clippy,
|
|
154
|
-
extra: {
|
|
155
|
-
if: false,
|
|
156
|
-
continueOnError: false,
|
|
157
|
-
run: '',
|
|
158
|
-
name: 'extra',
|
|
159
|
-
matrix: {
|
|
160
|
-
os: [Arch.ARM64],
|
|
161
|
-
toolchains: ['stable'],
|
|
162
|
-
features: ['default'],
|
|
163
|
-
},
|
|
164
|
-
},
|
|
19
|
+
fmt: DEFAULT_FMT,
|
|
20
|
+
semver: DEFAULT_SEMVER,
|
|
21
|
+
hack: DEFAULT_HACK,
|
|
22
|
+
docCheck: DEFAULT_DOC_CHECK,
|
|
23
|
+
cargoSort: DEFAULT_CARGO_SORT,
|
|
24
|
+
dependencies: DEFAULT_DEPENDENCIES,
|
|
25
|
+
sanitizers: DEFAULT_SANITIZERS,
|
|
26
|
+
coverage: DEFAULT_COVERAGE,
|
|
27
|
+
clippy: DEFAULT_CLIPPY,
|
|
28
|
+
extra: DEFAULT_EXTRA,
|
|
165
29
|
};
|
|
166
30
|
|
|
167
31
|
export class RustWorkflow {
|
|
@@ -192,16 +56,7 @@ export class RustWorkflow {
|
|
|
192
56
|
profile: 'release',
|
|
193
57
|
os: [Arch.AMD64],
|
|
194
58
|
};
|
|
195
|
-
this.ai =
|
|
196
|
-
prompt: PROMPT,
|
|
197
|
-
additional: '',
|
|
198
|
-
enabled: true,
|
|
199
|
-
track_progress: true,
|
|
200
|
-
allowed_bots: '*',
|
|
201
|
-
claude_args:
|
|
202
|
-
' --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(find),Bash(diff),Bash(jq),Bash(git),Bash(cargo),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"',
|
|
203
|
-
use_sticky_comment: false,
|
|
204
|
-
};
|
|
59
|
+
this.ai = DEFAULT_AI;
|
|
205
60
|
}
|
|
206
61
|
|
|
207
62
|
linuxPackages(packages: string[]) {
|
|
@@ -249,11 +104,6 @@ export class RustWorkflow {
|
|
|
249
104
|
return this;
|
|
250
105
|
}
|
|
251
106
|
|
|
252
|
-
additionalPrompt(prompt: string) {
|
|
253
|
-
this.ai.additional = prompt;
|
|
254
|
-
return this;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
107
|
build() {
|
|
258
108
|
// os:
|
|
259
109
|
// - target: aarch64-unknown-linux-gnu
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export enum Arch {
|
|
2
|
+
ARM64 = 'vars.RUNNER_ARM64',
|
|
3
|
+
AMD64 = 'vars.RUNNER_AMD64',
|
|
4
|
+
WIN = 'vars.RUNNER_WIN',
|
|
5
|
+
MAC = 'vars.RUNNER_MAC',
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface AiJob {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
allowed_bots: string;
|
|
11
|
+
claude_args: string;
|
|
12
|
+
use_sticky_comment: boolean;
|
|
13
|
+
track_progress: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface Global {
|
|
17
|
+
// to match $RUNNER_OS
|
|
18
|
+
packages: {
|
|
19
|
+
Linux?: string;
|
|
20
|
+
macOS?: string;
|
|
21
|
+
Windows?: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface BaseJob {
|
|
26
|
+
if: boolean | string;
|
|
27
|
+
continueOnError: boolean | string;
|
|
28
|
+
run?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Matrix {
|
|
32
|
+
os: Arch[];
|
|
33
|
+
toolchains: string[];
|
|
34
|
+
features: string[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface Fmt extends BaseJob {}
|
|
38
|
+
export interface SemVer extends BaseJob {}
|
|
39
|
+
export interface Hack extends BaseJob {}
|
|
40
|
+
export interface CargoSort extends BaseJob {}
|
|
41
|
+
export interface DocCheck extends BaseJob {}
|
|
42
|
+
export interface Dependencies extends BaseJob {}
|
|
43
|
+
export interface Extra extends BaseJob {
|
|
44
|
+
name: string;
|
|
45
|
+
matrix: Matrix;
|
|
46
|
+
}
|
|
47
|
+
export interface Sanitizers {
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
address: BaseJob;
|
|
50
|
+
leak: BaseJob;
|
|
51
|
+
thread: BaseJob;
|
|
52
|
+
}
|
|
53
|
+
export interface Clippy extends BaseJob {
|
|
54
|
+
flags: string;
|
|
55
|
+
matrix: Matrix;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface Coverage extends BaseJob {
|
|
59
|
+
matrix: Matrix;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface RustJobs {
|
|
63
|
+
clippy: Clippy;
|
|
64
|
+
coverage: Coverage;
|
|
65
|
+
cargoSort: CargoSort;
|
|
66
|
+
dependencies: Dependencies;
|
|
67
|
+
docCheck: DocCheck;
|
|
68
|
+
fmt: Fmt;
|
|
69
|
+
hack: Hack;
|
|
70
|
+
sanitizers: Sanitizers;
|
|
71
|
+
semver: SemVer;
|
|
72
|
+
extra: Extra;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface Release {
|
|
76
|
+
bin: boolean;
|
|
77
|
+
publish: boolean;
|
|
78
|
+
debian: boolean;
|
|
79
|
+
profile: string;
|
|
80
|
+
os: Arch[];
|
|
81
|
+
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# Copilot Instructions
|
|
2
|
-
|
|
3
|
-
This GitHub Action is written in TypeScript and transpiled to JavaScript. Both the TypeScript sources and the
|
|
4
|
-
**generated** JavaScript code are contained in this repository. The TypeScript sources are contained in the `src`
|
|
5
|
-
directory and the JavaScript code is contained in the `dist` directory. A GitHub Actions workflow checks that the
|
|
6
|
-
JavaScript code in `dist` is up-to-date. Therefore, you should not review any changes to the contents of the `dist`
|
|
7
|
-
folder and it is expected that the JavaScript code in `dist` closely mirrors the TypeScript code it is generated from.
|
|
8
|
-
|
|
9
|
-
## Repository Structure
|
|
10
|
-
|
|
11
|
-
| Path | Description |
|
|
12
|
-
| -------------------- | -------------------------------------------------------- |
|
|
13
|
-
| `__fixtures__/` | Unit Test Fixtures |
|
|
14
|
-
| `__tests__/` | Unit Tests |
|
|
15
|
-
| `.devcontainer/` | Development Container Configuration |
|
|
16
|
-
| `.github/` | GitHub Configuration |
|
|
17
|
-
| `.licenses/` | License Information |
|
|
18
|
-
| `.vscode/` | Visual Studio Code Configuration |
|
|
19
|
-
| `badges/` | Badges for readme |
|
|
20
|
-
| `dist/` | Generated JavaScript Code |
|
|
21
|
-
| `src/` | TypeScript Source Code |
|
|
22
|
-
| `.env.example` | Environment Variables Example for `@github/local-action` |
|
|
23
|
-
| `.licensed.yml` | Licensed Configuration |
|
|
24
|
-
| `.markdown-lint.yml` | Markdown Linter Configuration |
|
|
25
|
-
| `.node-version` | Node.js Version Configuration |
|
|
26
|
-
| `.prettierrc.yml` | Prettier Formatter Configuration |
|
|
27
|
-
| `.yaml-lint.yml` | YAML Linter Configuration |
|
|
28
|
-
| `action.yml` | GitHub Action Metadata |
|
|
29
|
-
| `CODEOWNERS` | Code Owners File |
|
|
30
|
-
| `eslint.config.mjs` | ESLint Configuration |
|
|
31
|
-
| `jest.config.js` | Jest Configuration |
|
|
32
|
-
| `LICENSE` | License File |
|
|
33
|
-
| `package.json` | NPM Package Configuration |
|
|
34
|
-
| `README.md` | Project Documentation |
|
|
35
|
-
| `rollup.config.ts` | Rollup Bundler Configuration |
|
|
36
|
-
| `tsconfig.json` | TypeScript Configuration |
|
|
37
|
-
|
|
38
|
-
## Environment Setup
|
|
39
|
-
|
|
40
|
-
Install dependencies by running:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
npm install
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Testing
|
|
47
|
-
|
|
48
|
-
Ensure all unit tests pass by running:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
npm run test
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Unit tests should exist in the `__tests__` directory. They are powered by `jest`. Fixtures should be placed in the
|
|
55
|
-
`__fixtures__` directory.
|
|
56
|
-
|
|
57
|
-
## Bundling
|
|
58
|
-
|
|
59
|
-
Any time files in the `src` directory are changed, you should run the following command to bundle the TypeScript code
|
|
60
|
-
into JavaScript:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
npm run bundle
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## General Coding Guidelines
|
|
67
|
-
|
|
68
|
-
- Follow standard TypeScript and JavaScript coding conventions and best practices
|
|
69
|
-
- Changes should maintain consistency with existing patterns and style
|
|
70
|
-
- Document changes clearly and thoroughly, including updates to existing comments when appropriate
|
|
71
|
-
- Do not include basic, unnecessary comments that simply restate what the code is doing (focus on explaining _why_, not
|
|
72
|
-
_what_)
|
|
73
|
-
- Use consistent error handling patterns throughout the codebase
|
|
74
|
-
- Use TypeScript's type system to ensure type safety and clarity
|
|
75
|
-
- Keep functions focused and manageable
|
|
76
|
-
- Use descriptive variable and function names that clearly convey their purpose
|
|
77
|
-
- Use JSDoc comments to document functions, classes, and complex logic
|
|
78
|
-
- After doing any refactoring, ensure to run `npm run test` to ensure that all tests still pass and coverage
|
|
79
|
-
requirements are met
|
|
80
|
-
- When suggesting code changes, always opt for the most maintainable approach. Try your best to keep the code clean and
|
|
81
|
-
follow "Don't Repeat Yourself" (DRY) principles
|
|
82
|
-
- Avoid unnecessary complexity and always consider the long-term maintainability of the code
|
|
83
|
-
- When writing unit tests, try to consider edge cases as well as the main path of success. This will help ensure that
|
|
84
|
-
the code is robust and can handle unexpected inputs or situations
|
|
85
|
-
- Use the `@actions/core` package for logging over `console` to ensure compatibility with GitHub Actions logging
|
|
86
|
-
features
|
|
87
|
-
|
|
88
|
-
### Versioning
|
|
89
|
-
|
|
90
|
-
GitHub Actions are versioned using branch and tag names. Please ensure the version in the project's `package.json` is
|
|
91
|
-
updated to reflect the changes made in the codebase. The version should follow
|
|
92
|
-
[Semantic Versioning](https://semver.org/) principles.
|
|
93
|
-
|
|
94
|
-
## Pull Request Guidelines
|
|
95
|
-
|
|
96
|
-
When creating a pull request (PR), please ensure that:
|
|
97
|
-
|
|
98
|
-
- Keep changes focused and minimal (avoid large changes, or consider breaking them into separate, smaller PRs)
|
|
99
|
-
- Formatting checks pass
|
|
100
|
-
- Linting checks pass
|
|
101
|
-
- Unit tests pass and coverage requirements are met
|
|
102
|
-
- The action has been transpiled to JavaScript and the `dist` directory is up-to-date with the latest changes in the
|
|
103
|
-
`src` directory
|
|
104
|
-
- If necessary, the `README.md` file is updated to reflect any changes in functionality or usage
|
|
105
|
-
|
|
106
|
-
The body of the PR should include:
|
|
107
|
-
|
|
108
|
-
- A summary of the changes
|
|
109
|
-
- A special note of any changes to dependencies
|
|
110
|
-
- A link to any relevant issues or discussions
|
|
111
|
-
- Any additional context that may be helpful for reviewers
|
|
112
|
-
|
|
113
|
-
## Code Review Guidelines
|
|
114
|
-
|
|
115
|
-
When performing a code review, please follow these guidelines:
|
|
116
|
-
|
|
117
|
-
- If there are changes that modify the functionality/usage of the action, validate that there are changes in the
|
|
118
|
-
`README.md` file that document the new or modified functionality
|
package/dist/ai.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface AiJob {
|
|
2
|
-
enabled: boolean;
|
|
3
|
-
allowed_bots: string;
|
|
4
|
-
claude_args: string;
|
|
5
|
-
use_sticky_comment: boolean;
|
|
6
|
-
track_progress: boolean;
|
|
7
|
-
prompt: string;
|
|
8
|
-
additional: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const PROMPT = "\nPerform a comprehensive code review with the following focus areas:\nProvide detailed feedback using inline comments for ONLY issues, no praise inline comments.\nUse top-level comments for general observations or praise\nDo not be shy, I am a big boy and can handle criticism gracefully. I welcome feedback and suggestions.\n\n\n## Rust tooling\n\nYou should have access to cargo cli. You can use this to verify the build yourself, or use it to run tests (or a specific test)\nIf you encounter an error running cargo, please comment on this PR. If you desire more rust tools, such as rust-analyzer, or any cargo plugin to help review then please notify on pull request\n\n\n## Permissions\n\nIf you are denied access to a tool, shell command, or github API resource (via gh cli) then notify the pull request author that you would like access to that tool.\nAs an example, we use CodeCov to our test coverage, if you like to have access to historical data, we can provide you with the CodeCov CLI tool and access.\nIn general, if you need something, just ask.\n\n\nReview this PR against our team checklist:\n\n## Code Quality\n- [ ] Code follows our style guide\n- [ ] No commented-out code\n- [ ] Meaningful variable names\n- [ ] DRY principle followed\n\n## Testing\n- [ ] Unit tests for new functions\n- [ ] Integration tests for new endpoints\n- [ ] Edge cases covered\n- [ ] Test coverage > 80%\n\n## Documentation\n- [ ] README updated if needed\n- [ ] API docs updated\n- [ ] Inline comments for complex logic\n- [ ] CHANGELOG.md updated\n\n## Security\n- [ ] No hardcoded credentials\n- [ ] Input validation implemented\n- [ ] Proper error handling\n- [ ] No sensitive data in logs\n\nFor each item, check if it is satisfied and comment on any that need attention.\nPost a summary comment with checklist results.\n\n\n";
|
|
11
|
-
//# sourceMappingURL=ai.d.ts.map
|
package/dist/ai.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../src/ai.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,MAAM,yyDAkDlB,CAAC"}
|
package/dist/ai.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
export const PROMPT = `
|
|
2
|
-
Perform a comprehensive code review with the following focus areas:
|
|
3
|
-
Provide detailed feedback using inline comments for ONLY issues, no praise inline comments.
|
|
4
|
-
Use top-level comments for general observations or praise
|
|
5
|
-
Do not be shy, I am a big boy and can handle criticism gracefully. I welcome feedback and suggestions.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Rust tooling
|
|
9
|
-
|
|
10
|
-
You should have access to cargo cli. You can use this to verify the build yourself, or use it to run tests (or a specific test)
|
|
11
|
-
If you encounter an error running cargo, please comment on this PR. If you desire more rust tools, such as rust-analyzer, or any cargo plugin to help review then please notify on pull request
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Permissions
|
|
15
|
-
|
|
16
|
-
If you are denied access to a tool, shell command, or github API resource (via gh cli) then notify the pull request author that you would like access to that tool.
|
|
17
|
-
As an example, we use CodeCov to our test coverage, if you like to have access to historical data, we can provide you with the CodeCov CLI tool and access.
|
|
18
|
-
In general, if you need something, just ask.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Review this PR against our team checklist:
|
|
22
|
-
|
|
23
|
-
## Code Quality
|
|
24
|
-
- [ ] Code follows our style guide
|
|
25
|
-
- [ ] No commented-out code
|
|
26
|
-
- [ ] Meaningful variable names
|
|
27
|
-
- [ ] DRY principle followed
|
|
28
|
-
|
|
29
|
-
## Testing
|
|
30
|
-
- [ ] Unit tests for new functions
|
|
31
|
-
- [ ] Integration tests for new endpoints
|
|
32
|
-
- [ ] Edge cases covered
|
|
33
|
-
- [ ] Test coverage > 80%
|
|
34
|
-
|
|
35
|
-
## Documentation
|
|
36
|
-
- [ ] README updated if needed
|
|
37
|
-
- [ ] API docs updated
|
|
38
|
-
- [ ] Inline comments for complex logic
|
|
39
|
-
- [ ] CHANGELOG.md updated
|
|
40
|
-
|
|
41
|
-
## Security
|
|
42
|
-
- [ ] No hardcoded credentials
|
|
43
|
-
- [ ] Input validation implemented
|
|
44
|
-
- [ ] Proper error handling
|
|
45
|
-
- [ ] No sensitive data in logs
|
|
46
|
-
|
|
47
|
-
For each item, check if it is satisfied and comment on any that need attention.
|
|
48
|
-
Post a summary comment with checklist results.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
`;
|
|
52
|
-
//# sourceMappingURL=ai.js.map
|
package/dist/ai.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../src/ai.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDrB,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { type AiJob } from './ai.js';
|
|
2
|
-
export declare enum Arch {
|
|
3
|
-
ARM64 = "vars.RUNNER_ARM64",
|
|
4
|
-
AMD64 = "vars.RUNNER_AMD64",
|
|
5
|
-
WIN = "vars.RUNNER_WIN",
|
|
6
|
-
MAC = "vars.RUNNER_MAC"
|
|
7
|
-
}
|
|
8
|
-
interface Global {
|
|
9
|
-
packages: {
|
|
10
|
-
Linux?: string;
|
|
11
|
-
macOS?: string;
|
|
12
|
-
Windows?: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
interface BaseJob {
|
|
16
|
-
if: boolean | string;
|
|
17
|
-
continueOnError: boolean | string;
|
|
18
|
-
run?: string;
|
|
19
|
-
}
|
|
20
|
-
interface Matrix {
|
|
21
|
-
os: Arch[];
|
|
22
|
-
toolchains: string[];
|
|
23
|
-
features: string[];
|
|
24
|
-
}
|
|
25
|
-
interface Fmt extends BaseJob {
|
|
26
|
-
}
|
|
27
|
-
interface SemVer extends BaseJob {
|
|
28
|
-
}
|
|
29
|
-
interface Hack extends BaseJob {
|
|
30
|
-
}
|
|
31
|
-
interface CargoSort extends BaseJob {
|
|
32
|
-
}
|
|
33
|
-
interface DocCheck extends BaseJob {
|
|
34
|
-
}
|
|
35
|
-
interface Dependencies extends BaseJob {
|
|
36
|
-
}
|
|
37
|
-
interface Extra extends BaseJob {
|
|
38
|
-
name: string;
|
|
39
|
-
matrix: Matrix;
|
|
40
|
-
}
|
|
41
|
-
interface Sanitizers {
|
|
42
|
-
enabled: boolean;
|
|
43
|
-
address: BaseJob;
|
|
44
|
-
leak: BaseJob;
|
|
45
|
-
thread: BaseJob;
|
|
46
|
-
}
|
|
47
|
-
interface Clippy extends BaseJob {
|
|
48
|
-
flags: string;
|
|
49
|
-
matrix: Matrix;
|
|
50
|
-
}
|
|
51
|
-
interface Coverage extends BaseJob {
|
|
52
|
-
matrix: Matrix;
|
|
53
|
-
}
|
|
54
|
-
interface RustJobs {
|
|
55
|
-
clippy: Clippy;
|
|
56
|
-
coverage: Coverage;
|
|
57
|
-
cargoSort: CargoSort;
|
|
58
|
-
dependencies: Dependencies;
|
|
59
|
-
docCheck: DocCheck;
|
|
60
|
-
fmt: Fmt;
|
|
61
|
-
hack: Hack;
|
|
62
|
-
sanitizers: Sanitizers;
|
|
63
|
-
semver: SemVer;
|
|
64
|
-
extra: Extra;
|
|
65
|
-
}
|
|
66
|
-
interface Release {
|
|
67
|
-
bin: boolean;
|
|
68
|
-
publish: boolean;
|
|
69
|
-
debian: boolean;
|
|
70
|
-
profile: string;
|
|
71
|
-
os: Arch[];
|
|
72
|
-
}
|
|
73
|
-
export declare const JobDefaults: RustJobs;
|
|
74
|
-
export declare class RustWorkflow {
|
|
75
|
-
private jobs;
|
|
76
|
-
private global;
|
|
77
|
-
private release;
|
|
78
|
-
private ai;
|
|
79
|
-
constructor();
|
|
80
|
-
linuxPackages(packages: string[]): this;
|
|
81
|
-
semver(enable: boolean): this;
|
|
82
|
-
extra(name: string, run: string): this;
|
|
83
|
-
withRelease(r: Release): this;
|
|
84
|
-
clippy(opts?: Partial<Clippy>): this;
|
|
85
|
-
disableSanitizers(): this;
|
|
86
|
-
disableAi(): this;
|
|
87
|
-
additionalPrompt(prompt: string): this;
|
|
88
|
-
build(): {
|
|
89
|
-
ai: AiJob;
|
|
90
|
-
release: {
|
|
91
|
-
bin: boolean;
|
|
92
|
-
publish: boolean;
|
|
93
|
-
debian: boolean;
|
|
94
|
-
profile: string;
|
|
95
|
-
matrix: {
|
|
96
|
-
os: Arch[];
|
|
97
|
-
target: string[];
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
global: Global;
|
|
101
|
-
jobs: RustJobs;
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
export declare function createRustWorkflow(): RustWorkflow;
|
|
105
|
-
export {};
|
|
106
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAU,MAAM,SAAS,CAAC;AAE7C,oBAAY,IAAI;IACd,KAAK,sBAAsB;IAC3B,KAAK,sBAAsB;IAC3B,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