You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "GreatEugenius (via GitHub)" <gi...@apache.org> on 2026/04/02 11:14:46 UTC
[PR] [infra] Add daily workflow to label closed issues missing fixVersion [flink-agents]
GreatEugenius opened a new pull request, #605:
URL: https://github.com/apache/flink-agents/pull/605
<!--
* Thank you very much for contributing to Flink Agents.
* Please add the relevant components in the PR title. E.g., [api], [runtime], [java], [python], [hotfix], etc.
-->
<!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. -->
Linked issue: #604
### Purpose of change
Add daily workflow to label closed issues missing fixVersion.
<!-- What is the purpose of this change? -->
### Tests
The test is in my own [repository](https://github.com/GreatEugenius/flink-agents/issues).
<!-- How is this change verified? -->
### API
<!-- Does this change touches any public APIs? -->
### Documentation
<!-- Do not remove this section. Check the proper box only. -->
- [ ] `doc-needed` <!-- Your PR changes impact docs -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-included` <!-- Your PR already contains the necessary documentation updates -->
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [infra] Add daily workflow to label closed issues missing fixVersion [flink-agents]
Posted by "GreatEugenius (via GitHub)" <gi...@apache.org>.
GreatEugenius commented on code in PR #605:
URL: https://github.com/apache/flink-agents/pull/605#discussion_r3247044915
##########
.github/workflows/issue_labeler.js:
##########
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+module.exports = async ({ github, context, core }) => {
+ const owner = context.repo.owner;
+ const repo = context.repo.repo;
+
+ // Search for issues closed as completed in the last 2 days without fixVersion/missing
+ const twoDaysAgo = new Date();
+ twoDaysAgo.setDate(twoDaysAgo.getDate() - 2);
+ const sinceDate = twoDaysAgo.toISOString().split('T')[0];
+
+ const query = `repo:${owner}/${repo} is:issue is:closed reason:completed -label:"fixVersion/missing" closed:>=${sinceDate}`;
+ core.info(`Search query: ${query}`);
+
+ const { data: searchResult } = await github.rest.search.issuesAndPullRequests({
+ q: query,
+ per_page: 100,
+ });
+
+ core.info(`Found ${searchResult.total_count} closed issues to check.`);
+
+ let labeledCount = 0;
+
+ for (const issue of searchResult.items) {
+ const hasFixVersion = issue.labels.some(label => label.name.startsWith('fixVersion/'));
+
+ if (!hasFixVersion) {
+ await github.rest.issues.addLabels({
+ owner,
+ repo,
+ issue_number: issue.number,
+ labels: ['fixVersion/missing'],
Review Comment:
Yes, but only the Commiter has the permission to create it. Please add the fixVersion/missing label before merging the branch.
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [infra] Add daily workflow to label closed issues missing fixVersion [flink-agents]
Posted by "wenjin272 (via GitHub)" <gi...@apache.org>.
wenjin272 commented on code in PR #605:
URL: https://github.com/apache/flink-agents/pull/605#discussion_r3246986640
##########
.github/workflows/issue_labeler.js:
##########
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+module.exports = async ({ github, context, core }) => {
+ const owner = context.repo.owner;
+ const repo = context.repo.repo;
+
+ // Search for issues closed as completed in the last 2 days without fixVersion/missing
+ const twoDaysAgo = new Date();
+ twoDaysAgo.setDate(twoDaysAgo.getDate() - 2);
+ const sinceDate = twoDaysAgo.toISOString().split('T')[0];
+
+ const query = `repo:${owner}/${repo} is:issue is:closed reason:completed -label:"fixVersion/missing" closed:>=${sinceDate}`;
+ core.info(`Search query: ${query}`);
+
+ const { data: searchResult } = await github.rest.search.issuesAndPullRequests({
+ q: query,
+ per_page: 100,
+ });
+
+ core.info(`Found ${searchResult.total_count} closed issues to check.`);
+
+ let labeledCount = 0;
+
+ for (const issue of searchResult.items) {
+ const hasFixVersion = issue.labels.some(label => label.name.startsWith('fixVersion/'));
+
+ if (!hasFixVersion) {
+ await github.rest.issues.addLabels({
+ owner,
+ repo,
+ issue_number: issue.number,
+ labels: ['fixVersion/missing'],
Review Comment:
It seems we don't have this label yet; we need to create it.
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [infra] Add daily workflow to label closed issues missing fixVersion [flink-agents]
Posted by "wenjin272 (via GitHub)" <gi...@apache.org>.
wenjin272 merged PR #605:
URL: https://github.com/apache/flink-agents/pull/605
--
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@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org