mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-18 10:01:29 -07:00
43 lines
1.5 KiB
YAML
43 lines
1.5 KiB
YAML
name: 'Label Child Issues for Project Rollup'
|
|
|
|
on:
|
|
issues:
|
|
types: ['opened', 'edited']
|
|
|
|
jobs:
|
|
labeler:
|
|
runs-on: 'ubuntu-latest'
|
|
permissions:
|
|
issues: 'write'
|
|
steps:
|
|
- name: 'Check for Parent Workstream and Apply Label'
|
|
uses: 'actions/github-script@v7'
|
|
with:
|
|
script: |
|
|
const issue = context.payload.issue;
|
|
const parentWorkstreamNumbers = [15374, 15456, 15324];
|
|
const labelToAdd = 'workstream-rollup';
|
|
|
|
// --- START DEBUGGING ---
|
|
console.log('--- Full Issue Object from Payload ---');
|
|
console.log(JSON.stringify(issue, null, 2));
|
|
console.log('--- End of Full Issue Object ---');
|
|
|
|
console.log(`Value of issue.parent is: ${issue.parent}`);
|
|
if (issue.parent) {
|
|
console.log(`Value of issue.parent.number is: ${issue.parent.number}`);
|
|
}
|
|
// --- END DEBUGGING ---
|
|
|
|
if (issue.parent && parentWorkstreamNumbers.includes(issue.parent.number)) {
|
|
console.log(`SUCCESS: Issue #${issue.number} is a child of a target workstream. Adding label.`);
|
|
await github.rest.issues.addLabels({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: issue.number,
|
|
labels: [labelToAdd]
|
|
});
|
|
} else {
|
|
console.log(`FAILURE: Issue #${issue.number} is not a child of a target workstream. No action taken.`);
|
|
}
|