kou commented on code in PR #55352:
URL: https://github.com/apache/arrow/pull/55352#discussion_r4435601523


##########
.github/workflows/unassign_bot.yml:
##########
@@ -0,0 +1,55 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, 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: Unassign Inactive Contributors
+
+on:
+  schedule:
+    - cron: "0 10 * * *"
+  workflow_dispatch:
+  pull_request_target:
+    types:
+      - closed

Review Comment:
   How about keeping only `schedule`?
   
   I think that nobody doesn't use `workflow_dispatch`.
   
   `pull_request_target` may run a contributor's code with write permission if 
we introduce a buggy implementation.
   
   ```suggestion
   ```



##########
.github/workflows/unassign_bot.yml:
##########
@@ -0,0 +1,55 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, 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: Unassign Inactive Contributors
+
+on:
+  schedule:
+    - cron: "0 10 * * *"
+  workflow_dispatch:
+  pull_request_target:
+    types:
+      - closed
+
+permissions:
+  contents: read
+  issues: write
+  pull-requests: read
+
+concurrency:
+  group: unassign-inactive-contributors
+  queue: max
+  cancel-in-progress: false
+
+jobs:
+  unassign-inactive-contributors:
+    name: Unassign inactive contributors
+    runs-on: ubuntu-latest
+    timeout-minutes: 15
+    steps:
+      - name: Checkout Arrow
+        uses: actions/checkout@v7
+        with:
+          persist-credentials: false
+          sparse-checkout: .github
+
+      - name: Run unassign bot
+        uses: actions/github-script@v9
+        with:
+          script: |
+            const unassignBot = require("./.github/workflows/unassign_bot.js");
+            await unassignBot({ github, context});

Review Comment:
   ```suggestion
               await unassignBot({ github, context });
   ```



##########
.github/workflows/unassign_bot.js:
##########


Review Comment:
    The implementation seems large for the feature we want. Can we make it 
simpler?



##########
.github/workflows/unassign_bot.js:
##########
@@ -0,0 +1,340 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, 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.
+
+// Releases abandoned assignments on newcomer-friendly issues:
+//   - a linked PR is closed without merging and no other open linked PR
+//     exists from the same author -> unassign immediately
+//   - no qualifying activity for WARN_AFTER_DAYS -> warn,
+//     then unassign GRACE_DAYS later if there is still no activity.
+
+const helpers = require("./dev_pr/helpers.js");
+
+const WARN_AFTER_DAYS = 5;
+const GRACE_DAYS = 3;

Review Comment:
   8 days? #55344 says "No PR opened within 30 days of assignment".



##########
.github/workflows/unassign_bot.yml:
##########
@@ -0,0 +1,55 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, 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: Unassign Inactive Contributors
+
+on:
+  schedule:
+    - cron: "0 10 * * *"
+  workflow_dispatch:
+  pull_request_target:
+    types:
+      - closed
+
+permissions:
+  contents: read
+  issues: write
+  pull-requests: read
+
+concurrency:
+  group: unassign-inactive-contributors
+  queue: max
+  cancel-in-progress: false

Review Comment:
   Can we remove this if we use only `schedule`?



-- 
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]

Reply via email to