Skip to content

chore(deps): bump alloy-signer-aws from 1.8.3 to 2.0.0 #142

chore(deps): bump alloy-signer-aws from 1.8.3 to 2.0.0

chore(deps): bump alloy-signer-aws from 1.8.3 to 2.0.0 #142

Workflow file for this run

name: PR Quality Gate
on:
pull_request:
branches: [main]
types: [opened, edited, synchronize, reopened, ready_for_review]
jobs:
validate-pr-description:
name: Validate PR Description
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Export changed files
uses: actions/github-script@v7
with:
script: |
const fs = require("fs");
const files = await github.paginate(github.rest.pulls.listFiles, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
per_page: 100,
});
fs.writeFileSync(
"/tmp/pr-changed-files.txt",
files.map((f) => f.filename).join("\n"),
);
- name: Validate policy script tests
run: python3 -m unittest discover -s .github/scripts/tests -p "test_*.py"
- name: Validate PR template completion
id: validate
run: |
set +e
python3 .github/scripts/validate_pr_body.py \
--changed-files-file /tmp/pr-changed-files.txt \
--config-file .github/pr-quality-gate.toml \
--report-file /tmp/pr-quality-report.json
status=$?
echo "status=$status" >> "$GITHUB_OUTPUT"
exit 0
- name: Post PR quality summary
uses: actions/github-script@v7
with:
script: |
const fs = require("fs");
const marker = "<!-- pr-quality-gate-report -->";
const report = JSON.parse(fs.readFileSync("/tmp/pr-quality-report.json", "utf8"));
const lines = [];
lines.push(`${marker}`);
lines.push("## PR Quality Gate Summary");
if (report.skipped) {
lines.push("- Status: skipped");
lines.push(`- Reason: ${report.required_reason}`);
} else {
lines.push(`- Status: ${report.valid ? "pass" : "fail"}`);
lines.push(`- Selected class: ${report.selected_class_normalized ?? "not set"}`);
lines.push(`- Required class: ${report.required_class ?? "n/a"}`);
lines.push(`- Reason: ${report.required_reason}`);
lines.push(`- Changed files: ${report.changed_files_count}`);
}
if (report.errors && report.errors.length > 0) {
lines.push("");
lines.push("### Blocking issues");
for (const err of report.errors) {
lines.push(`- ${err}`);
}
}
const body = lines.join("\n");
const { owner, repo } = context.repo;
const issue_number = context.payload.pull_request.number;
const comments = await github.paginate(github.rest.issues.listComments, {
owner,
repo,
issue_number,
per_page: 100,
});
const existing = comments.find(
(c) => c.user?.type === "Bot" && typeof c.body === "string" && c.body.includes(marker),
);
if (existing) {
await github.rest.issues.updateComment({
owner,
repo,
comment_id: existing.id,
body,
});
} else {
await github.rest.issues.createComment({
owner,
repo,
issue_number,
body,
});
}
- name: Fail on validation errors
if: steps.validate.outputs.status != '0'
run: exit 1