You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sarvekshayr (via GitHub)" <gi...@apache.org> on 2025/11/07 08:28:38 UTC

[PR] HDDS-11370. Use GitHub's stale action to auto close inactive pull requests [ozone]

sarvekshayr opened a new pull request, #9259:
URL: https://github.com/apache/ozone/pull/9259

   ## What changes were proposed in this pull request?
   See https://github.com/apache/ozone/discussions/7096
   
   Currently we have a custom label that is manually applied to pull requests to mark them for auto closing, after which an auto-close action will come in later. Since this workflow seems to be leaving a lot of old PRs open, this Jira is to replace this workflow with https://github.com/actions/stale which does a similar thing but is completely automated.
   
   ## What is the link to the Apache JIRA
   [HDDS-11370](https://issues.apache.org/jira/browse/HDDS-11370)
   
   ## How was this patch tested?
   Tested on my fork.
   
   PR marked as stale: https://github.com/sarvekshayr/ozone/pull/47
   close-stale-prs CI: https://github.com/sarvekshayr/ozone/actions/runs/19161704140
   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11370. Use GitHub's stale action to auto close inactive pull requests [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #9259:
URL: https://github.com/apache/ozone/pull/9259#issuecomment-3510859285

   Thanks @sarvekshayr for the patch, @errose28 for the review.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11370. Use GitHub's stale action to auto close inactive pull requests [ozone]

Posted by "sarvekshayr (via GitHub)" <gi...@apache.org>.
sarvekshayr commented on PR #9259:
URL: https://github.com/apache/ozone/pull/9259#issuecomment-3501438028

   Should we consider increasing the number of days before marking it stale? Right now it’s set to 21 days of inactivity, which might be a bit aggressive.
   
   cc: @ChenSammi


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11370. Use GitHub's stale action to auto close inactive pull requests [ozone]

Posted by "sarvekshayr (via GitHub)" <gi...@apache.org>.
sarvekshayr commented on code in PR #9259:
URL: https://github.com/apache/ozone/pull/9259#discussion_r2506333365


##########
.github/workflows/close-stale-prs.yaml:
##########
@@ -12,21 +12,26 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-name: close-prs
+name: close-stale-prs
 
 on:
   schedule:
-  - cron:  '0 0 * * *'
+    - cron: '0 0 * * *'
 
 jobs:
-  close-pending:
-    name: close-pending
-    runs-on: ubuntu-24.04
+  stale:
+    permissions:
+      pull-requests: write
+    runs-on: ubuntu-latest
     steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Execute close-pending script
-        if: github.repository == 'apache/ozone'
-        run: ./.github/close-pending.sh
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - name: Close Stale PRs
+        uses: actions/stale@v10
+        with:
+          stale-pr-label: 'stale'
+          exempt-draft-pr: false
+          days-before-pr-stale: 21

Review Comment:
   We only raise PRs in this repo, which is why I didn’t include any configurations for issues.
   However, I can set `days-before-issue-stale: -1` to be on the safer side.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11370. Use GitHub's stale action to auto close inactive pull requests [ozone]

Posted by "sarvekshayr (via GitHub)" <gi...@apache.org>.
sarvekshayr commented on PR #9259:
URL: https://github.com/apache/ozone/pull/9259#issuecomment-3501268627

   @errose28 @adoroszlai please review this change.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11370. Use GitHub's stale action to auto close inactive pull requests [ozone]

Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on code in PR #9259:
URL: https://github.com/apache/ozone/pull/9259#discussion_r2504940209


##########
.github/workflows/close-stale-prs.yaml:
##########
@@ -12,21 +12,26 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-name: close-prs
+name: close-stale-prs
 
 on:
   schedule:
-  - cron:  '0 0 * * *'
+    - cron: '0 0 * * *'
 
 jobs:
-  close-pending:
-    name: close-pending
-    runs-on: ubuntu-24.04
+  stale:

Review Comment:
   This gets shown on the actions UI in the left column like [this](https://github.com/sarvekshayr/ozone/actions/runs/19161704140/job/54773158273) and in the [summary](https://github.com/sarvekshayr/ozone/actions/runs/19161704140) so it would be better to use a more descriptive name.
   ```suggestion
     close-stale-prs:
   ```



##########
.github/workflows/close-stale-prs.yaml:
##########
@@ -12,21 +12,26 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-name: close-prs
+name: close-stale-prs
 
 on:
   schedule:
-  - cron:  '0 0 * * *'
+    - cron: '0 0 * * *'
 
 jobs:
-  close-pending:
-    name: close-pending
-    runs-on: ubuntu-24.04
+  stale:
+    permissions:
+      pull-requests: write
+    runs-on: ubuntu-latest
     steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Execute close-pending script
-        if: github.repository == 'apache/ozone'
-        run: ./.github/close-pending.sh
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - name: Close Stale PRs
+        uses: actions/stale@v10
+        with:
+          stale-pr-label: 'stale'
+          exempt-draft-pr: false
+          days-before-pr-stale: 21

Review Comment:
   Do we also have to set `days-before-issue-stale: -1` so that the default `days-before-stale` does not affect issues?
   
   https://github.com/actions/stale?tab=readme-ov-file#days-before-issue-stale



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11370. Use GitHub's stale action to auto close inactive pull requests [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #9259:
URL: https://github.com/apache/ozone/pull/9259


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11370. Use GitHub's stale action to auto close inactive pull requests [ozone]

Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on code in PR #9259:
URL: https://github.com/apache/ozone/pull/9259#discussion_r2518931055


##########
.github/workflows/close-stale-prs.yaml:
##########
@@ -12,21 +12,26 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-name: close-prs
+name: close-stale-prs
 
 on:
   schedule:
-  - cron:  '0 0 * * *'
+    - cron: '0 0 * * *'
 
 jobs:
-  close-pending:
-    name: close-pending
-    runs-on: ubuntu-24.04
+  stale:
+    permissions:
+      pull-requests: write
+    runs-on: ubuntu-latest
     steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Execute close-pending script
-        if: github.repository == 'apache/ozone'
-        run: ./.github/close-pending.sh
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - name: Close Stale PRs
+        uses: actions/stale@v10
+        with:
+          stale-pr-label: 'stale'
+          exempt-draft-pr: false
+          days-before-pr-stale: 21

Review Comment:
   Oh I confused issues with discussion.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org