Merge pull request 'refactor: restrict meta workflow to src/workflows/ scope' (#12) from refactor/restrict-meta-workflow-scope into main
CI / test (push) Has been cancelled
CI / test (push) Has been cancelled
This commit was merged in pull request #12.
This commit is contained in:
@@ -57,12 +57,9 @@ export function createMetaCheckerRole(opts: {
|
||||
}
|
||||
|
||||
if (changedFiles.length > 0) {
|
||||
// Allowed: src/workflows/*, docs/*, tests under src/
|
||||
// Allowed: only src/workflows/ (meta workflow scope)
|
||||
const allowedPrefixes = [
|
||||
'src/',
|
||||
'docs/',
|
||||
'test/',
|
||||
'tests/',
|
||||
'src/workflows/',
|
||||
...(opts.allowedPrefixes ?? []),
|
||||
];
|
||||
|
||||
@@ -84,7 +81,7 @@ export function createMetaCheckerRole(opts: {
|
||||
];
|
||||
for (const file of changedFiles) {
|
||||
const basename = file.split('/').pop() ?? file;
|
||||
if (blacklist.includes(basename) && !file.startsWith('src/workflows/')) {
|
||||
if (blacklist.includes(basename)) {
|
||||
violations.push(`禁止修改: ${file}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ ${testerFeedback}
|
||||
|
||||
## 约束
|
||||
- commit author: 小橘 <xiaoju@shazhou.work>
|
||||
- 只修改 $HOME/.upulse/engine/src/workflows/ 下的代码
|
||||
- 不修改 workflow-rule-adapter.ts 和 workflow-type.ts`;
|
||||
|
||||
return { prompt, cwd: repoDir };
|
||||
|
||||
Reference in New Issue
Block a user