Merge branch 'master' into dependabot/docker/docker/backend/rust-1.92-bookworm

This commit is contained in:
Felipe Knorr Kuhn 2026-01-24 16:36:03 -08:00 committed by GitHub
commit 6cc56bdbab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 58 additions and 11 deletions

View file

@ -1,21 +1,68 @@
# Workflow: Automatically set project status to "Review Needed" when a reviewer is requested
name: Set Project Status on Review Request
# Workflow: Automate project board management
# - Add newly created issues to project #8
# - Set status to "Review Needed" when a reviewer is requested on a non-draft PR
name: Project Board Automation
# Trigger: Runs whenever a reviewer is requested on a pull request
# Triggers: Review requested on PRs, or new issues opened
on:
pull_request:
types: [review_requested]
issues:
types: [opened]
jobs:
update-project-status:
manage-project-board:
runs-on: ubuntu-latest
steps:
- name: Update Project Status to Review Needed
- name: Update Project Board
uses: actions/github-script@v7
with:
# Use the PAT stored in repository secrets (has project write access)
github-token: ${{ secrets.PROJECT_TOKEN }}
script: |
// Skip draft PRs
if (context.eventName === 'pull_request' && context.payload.pull_request.draft) {
console.log('PR is a draft, skipping Review Needed status...');
return;
}
// Handle new issues - add to project
if (context.eventName === 'issues') {
const addMutation = `
mutation($projectId: ID!, $contentId: ID!) {
addProjectV2ItemById(input: {projectId: $projectId, contentId: $contentId}) {
item { id }
}
}
`;
try {
await github.graphql(addMutation, {
projectId: "${{ secrets.PROJECT_ID }}",
contentId: context.payload.issue.node_id
});
console.log('Successfully added issue to project #8');
} catch (error) {
// Handle case where the issue is already in the project, or log other failures
const errors = error && error.errors ? error.errors : [];
const alreadyInProject = errors.some(e =>
typeof e.message === 'string' &&
e.message.toLowerCase().includes('already') &&
e.message.toLowerCase().includes('project')
);
if (alreadyInProject) {
console.log('Issue is already in project #8, skipping add.');
} else {
console.error('Failed to add issue to project #8:', error);
throw error;
}
}
return;
}
// Handle PR review_requested - update status to "Review Needed"
// GraphQL query to find the PR's project items
// This fetches all projects the PR is linked to
const query = `

View file

@ -13528,9 +13528,9 @@
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"version": "4.17.23",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
"devOptional": true
},
"node_modules/lodash.debounce": {
@ -27233,9 +27233,9 @@
}
},
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"version": "4.17.23",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
"devOptional": true
},
"lodash.debounce": {