google-gemini / google-gemini/gemini-cli
ci(workflow): unassign-inactive-assignees fails daily with SyntaxError: Illegal continue statement
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What happened?
The daily scheduled workflow `.github/workflows/unassign-inactive-assignees.yml` fails on every single run immediately upon startup with an unhandled `SyntaxError`:
```text
SyntaxError: Illegal continue statement: no surrounding iteration statement
at new AsyncFunction ()
at callAsyncFunction (/home/runner/work/_actions/actions/github-script/f28e40c7f34bde8b3046d885e986cb6290c5673b/dist/index.js:36187:16)
at main (/home/runner/work/_actions/actions/github-script/f28e40c7f34bde8b3046d885e986cb6290c5673b/dist/index.js:36285:26)
##[error]Unhandled error: SyntaxError: Illegal continue statement: no surrounding iteration statement
```
#### Evidence from Live Runs
Every scheduled execution of this workflow has exited with `failure` in ~9 seconds. Recent run IDs on `main`:
- Run **34684830613** (2026-09-12 09:03 UTC): [Failed Run Log](https://github.com/google-gemini/gemini-cli/actions/runs/34684830613)
- Run **34582238848** (2026-09-11 09:03 UTC): [Failed Run Log](https://github.com/google-gemini/gemini-cli/actions/runs/34582238848)
- Run **34458530756** (2026-09-10 09:03 UTC): [Failed Run Log](https://github.com/google-gemini/gemini-cli/actions/runs/34458530756)
- Run **34332549930** (2026-09-09 09:03 UTC): [Failed Run Log](https://github.com/google-gemini/gemini-cli/actions/runs/34332549930)
#### Root Cause in `.github/workflows/unassign-inactive-assignees.yml`
In the inline script step (lines 140–160):
```javascript
const assignedIssues = issues.filter(
(issue) => !issue.pull_request && issue.assignees && issue.assignees.length > 0
);
core.info(`Found ${assignedIssues.length} assigned "help wanted" issues.`);
let totalUnassigned = 0;
let timelineEvents = [];
try {
timelineEvents = await github.paginate(github.rest.issues.listEventsForTimeline, {
owner,
repo,
issue_number: issue.number,
per_page: 100,
mediaType: { previews: ['mockingbird'] },
});
} catch (err) {
core.warning(`Could not fetch timeline for issue #${issue.number}: ${err.message}`);
continue; // <-- Line 159: Illegal continue outside an iteration statement
}
```
The loop statement `for (const issue of assignedIssues) {` is missing between lines 146 and 148. Notice that lines 148–312 are indented with two extra spaces, and line 313 contains the orphaned closing brace `}`:
```javascript
309: totalUnassigned += assigneesToRemove.length;
310: core.info(
311: ` ${dryRun ? '[DRY RUN] Would have unassigned' : 'Unassigned'}: ${assigneesToRemove.join(', ')}`
312: );
313: }
```
Because `new AsyncFunction(...)` cannot parse an orphaned `continue;` statement outside of a loop, Node.js throws `SyntaxError` before executing any logic. As a result, **no inactive contributors have ever been unassigned since this workflow was added**, leaving all `help wanted` issues blocked indefinitely.
---
### What did you expect to happen?
The workflow should iterate over `assignedIssues`, evaluate the 7-day inactivity rule, and unassign contributors who do not have an open ready-for-review PR linked to the issue.
---
### Client information
Client Information
Not applicable. This is a GitHub Actions automation workflow issue in `.github/workflows/unassign-inactive-assignees.yml`.
---
### Login information
Not applicable.
---
### Anything else we need to know?
- **Proposed Fix**: Insert `for (const issue of assignedIssues) {` at line 147 of `.github/workflows/unassign-inactive-assignees.yml`. We verified locally that wrapping the block in this loop satisfies the Node.js `AsyncFunction` parser and resolves the `SyntaxError`.
- **Contribution Readiness**: I have prepared and verified the fix branch locally. If maintainers confirm, I am ready to open a pull request to resolve this.
Contributor guide
Research direction
Open .github/workflows/unassign-inactive-assignees.yml and inspect the inline script around lines 140–160, where the assignedIssues block lacks its loop. Restore the iteration described in the issue, then validate the workflow or run it to confirm the SyntaxError is gone and inactive assignees are evaluated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, javascript
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100