bito-code-review[bot] commented on PR #42209:
URL: https://github.com/apache/superset/pull/42209#issuecomment-5124986225

   <!-- Bito Reply -->
   The current implementation uses `stale.head.ref.startsWith("helm-publish")`, 
which is indeed too broad as it matches any branch starting with that prefix. 
To narrow the scope to only the old per-SHA branches (e.g., 
`helm-publish-<sha>`), you should update the condition to check for the prefix 
followed by a hyphen. 
   
   Given that `branchName` is defined as `helm-publish` in this workflow, you 
can update the check to use `${branchName}-` as follows:
   
   ```javascript
   // Update the condition to match only branches starting with 'helm-publish-'
   if (
     stale.number !== current.number &&
     stale.head.repo?.full_name === process.env.GITHUB_REPOSITORY &&
     stale.head.ref.startsWith(`${branchName}-`)
   ) {
   ```
   
   This change ensures that only branches following the old 
`helm-publish-<sha>` naming convention are targeted for closure, preventing 
accidental closure of other branches that might share the `helm-publish` prefix.
   
   **.github/workflows/superset-helm-release.yml**
   ```
   stale.head.repo?.full_name === process.env.GITHUB_REPOSITORY &&
                   stale.head.ref.startsWith(`${branchName}-`)
                 ) {
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to