mirror of
https://github.com/cloudflare/cloudflare-docs.git
synced 2026-01-11 20:06:58 +00:00
CODEOWNER and chore assignee changes (#26379)
* CODEOWNER and chore assignee changes * Codeowner action fixes * Only call assignees API if array > 0 * Rebuild action assign-pr --------- Co-authored-by: Pedro Sousa <680496+pedrosousa@users.noreply.github.com>
This commit is contained in:
parent
a1655eccf9
commit
231bbf61ac
7 changed files with 26 additions and 38 deletions
4
.github/CODEOWNERS
vendored
4
.github/CODEOWNERS
vendored
|
|
@ -200,8 +200,8 @@ src/content/docs/smart-shield/ @RebeccaTamachiro @cloudflare/pcx-technical-writi
|
|||
|
||||
# Reference architecture
|
||||
|
||||
/src/content/docs/reference-architecture/ @securitypedant @haleycode @cloudflare/pcx-technical-writing
|
||||
/src/assets/images/reference-architecture/ @securitypedant @haleycode @cloudflare/pcx-technical-writing
|
||||
/src/content/docs/reference-architecture/ @securitypedant @cloudflare/pcx-technical-writing
|
||||
/src/assets/images/reference-architecture/ @securitypedant @cloudflare/pcx-technical-writing
|
||||
|
||||
# Security products
|
||||
|
||||
|
|
|
|||
2
.github/actions/assign-pr/index.js
vendored
2
.github/actions/assign-pr/index.js
vendored
File diff suppressed because one or more lines are too long
22
.github/actions/assign-pr/index.ts
vendored
22
.github/actions/assign-pr/index.ts
vendored
|
|
@ -78,24 +78,18 @@ async function list(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (assignees.size === 0) {
|
||||
// assign folks which will manually reassign
|
||||
["haleycode", "pedrosousa", "dcpena", "patriciasantaana"].forEach(
|
||||
(username) => assignees.add(username),
|
||||
);
|
||||
}
|
||||
|
||||
// don't self-assign
|
||||
assignees.delete(author);
|
||||
|
||||
try {
|
||||
await client.rest.issues.addAssignees({
|
||||
repo: repository.name,
|
||||
owner: repository.owner.login,
|
||||
issue_number: prnumber,
|
||||
assignees: [...assignees],
|
||||
});
|
||||
if (assignees.size > 0) {
|
||||
await client.rest.issues.addAssignees({
|
||||
repo: repository.name,
|
||||
owner: repository.owner.login,
|
||||
issue_number: prnumber,
|
||||
assignees: [...assignees],
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
|
|
|||
10
.github/actions/issue-label-assign/index.js
vendored
10
.github/actions/issue-label-assign/index.js
vendored
File diff suppressed because one or more lines are too long
22
.github/actions/issue-label-assign/index.ts
vendored
22
.github/actions/issue-label-assign/index.ts
vendored
|
|
@ -65,22 +65,16 @@ import * as codeOwnersUtils from "codeowners-utils";
|
|||
}
|
||||
console.log("Assignees are:");
|
||||
console.log(assignees);
|
||||
|
||||
if (assignees.size === 0) {
|
||||
// assign folks which will manually reassign
|
||||
["haleycode", "pedrosousa", "dcpena", "patriciasantaana"].forEach(
|
||||
(username) => assignees.add(username),
|
||||
);
|
||||
}
|
||||
|
||||
const client = github.getOctokit(token);
|
||||
|
||||
await client.rest.issues.addAssignees({
|
||||
owner: repository.owner.login,
|
||||
issue_number: issue.number,
|
||||
repo: repository.name,
|
||||
assignees: [...assignees],
|
||||
});
|
||||
if (assignees.size > 0) {
|
||||
await client.rest.issues.addAssignees({
|
||||
owner: repository.owner.login,
|
||||
issue_number: issue.number,
|
||||
repo: repository.name,
|
||||
assignees: [...assignees],
|
||||
});
|
||||
}
|
||||
|
||||
console.log("Assignees added (if present)");
|
||||
|
||||
|
|
|
|||
2
.github/workflows/anchor-link-audit.yml
vendored
2
.github/workflows/anchor-link-audit.yml
vendored
|
|
@ -57,4 +57,4 @@ jobs:
|
|||
curl --silent -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues" \
|
||||
-d "{\"title\": \"Broken Header Links Found\", \"body\": \"$(cat issue_body.txt)\", \"assignees\": [\"haleycode\"]}"
|
||||
-d "{\"title\": \"Broken Header Links Found\", \"body\": \"$(cat issue_body.txt)\"}"
|
||||
2
.github/workflows/image-audit.yml
vendored
2
.github/workflows/image-audit.yml
vendored
|
|
@ -49,4 +49,4 @@ jobs:
|
|||
curl --silent -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
"https://api.github.com/repos/cloudflare/cloudflare-docs/issues" \
|
||||
-d "{\"title\": \"Unused Image Files Found\", \"body\": \"$(cat unused_files.txt)\", \"assignees\": [\"haleycode\"]}"
|
||||
-d "{\"title\": \"Unused Image Files Found\", \"body\": \"$(cat unused_files.txt)\"}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue