From 4b88fd65e2c5f3a35bfed31b5247976de9eecd9d Mon Sep 17 00:00:00 2001 From: Cyril Novel <5690282+cnovel@users.noreply.github.com> Date: Thu, 18 Jun 2026 14:41:25 +0200 Subject: [PATCH 1/5] Update codeowners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mathieu, Rémi and Marc are now just mentionned whenever we change reality-data-client --- .github/CODEOWNERS | 13 ++-- .../mention-reality-data-client-changes.yml | 63 +++++++++++++++++++ 2 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/mention-reality-data-client-changes.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 480de3f5..b998ddec 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,12 +1,13 @@ -* @dbiguenet @cnovel @lr06 @RenaudKeriven @arianacarnielli @mcote01 @MarcBedard8 - +* @dbiguenet @cnovel @lr06 @RenaudKeriven @arianacarnielli @MarcBedard8 + .github/workflows/typescript/typescript-publish-release.yml @aruniverse @itwin/oss-admins - + python_sdk/ @dbiguenet @cnovel @RenaudKeriven - + # https://developer.bentley.com/apis/reality-management/overview/ -typescript/packages/reality-data-client/ @mcote01 @MarcBedard8 @matmarchand @BeChaRem + +typescript/packages/reality-data-client/ @dbiguenet @cnovel @RenaudKeriven typescript/packages/reality-capture/ @dbiguenet @cnovel @RenaudKeriven -typescript/examples/ @dbiguenet @cnovel @RenaudKeriven \ No newline at end of file +typescript/examples/ @dbiguenet @cnovel @RenaudKeriven diff --git a/.github/workflows/mention-reality-data-client-changes.yml b/.github/workflows/mention-reality-data-client-changes.yml new file mode 100644 index 00000000..bd16c542 --- /dev/null +++ b/.github/workflows/mention-reality-data-client-changes.yml @@ -0,0 +1,63 @@ +name: Mention reality-data-client maintainers + +on: + pull_request: + paths: + - "typescript/packages/reality-data-client/**" + branches: + - main + +jobs: + mention_maintainers: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Check if maintainers are already mentioned + id: check_mentioned + uses: actions/github-script@v7 + with: + script: | + const maintainers = ['MarcBedard8', 'matmarchand', 'BeChaRem']; + const pr = context.payload.pull_request; + const prBody = pr.body || ''; + + // Get all comments on the PR + const comments = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number + }); + + // Check if this workflow has already commented + const workflowCommentExists = comments.data.some(comment => + comment.body.includes('') + ); + + if (workflowCommentExists) { + core.setOutput('should_comment', 'false'); + return; + } + + // Check if maintainers are already mentioned in PR body or comments + const allText = prBody + '\n' + comments.data.map(c => c.body).join('\n'); + + const toMention = maintainers.filter(user => + !allText.includes(`@${user}`) + ); + + core.setOutput('to_mention', toMention.join(' @')); + core.setOutput('should_comment', toMention.length > 0 ? 'true' : 'false'); + + - name: Comment mentioning maintainers + if: steps.check_mentioned.outputs.should_comment == 'true' + uses: actions/github-script@v7 + with: + script: | + const toMention = '${{ steps.check_mentioned.outputs.to_mention }}'; + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `\nFYI: This PR affects \`typescript/packages/reality-data-client/\` @${toMention}` + }); From 22ce898785097e33c0ad7e780d714f87c2292c44 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Jun 2026 12:44:57 +0000 Subject: [PATCH 2/5] Fix mention workflow logic for PR comments --- .../mention-reality-data-client-changes.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/mention-reality-data-client-changes.yml b/.github/workflows/mention-reality-data-client-changes.yml index bd16c542..2bc4e498 100644 --- a/.github/workflows/mention-reality-data-client-changes.yml +++ b/.github/workflows/mention-reality-data-client-changes.yml @@ -1,7 +1,13 @@ name: Mention reality-data-client maintainers on: - pull_request: + pull_request_target: + types: + - opened + - reopened + - synchronize + - edited + - ready_for_review paths: - "typescript/packages/reality-data-client/**" branches: @@ -11,7 +17,7 @@ jobs: mention_maintainers: runs-on: ubuntu-latest permissions: - pull-requests: write + issues: write steps: - name: Check if maintainers are already mentioned id: check_mentioned @@ -23,15 +29,15 @@ jobs: const prBody = pr.body || ''; // Get all comments on the PR - const comments = await github.rest.issues.listComments({ + const comments = await github.paginate(github.rest.issues.listComments, { owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number }); // Check if this workflow has already commented - const workflowCommentExists = comments.data.some(comment => - comment.body.includes('') + const workflowCommentExists = comments.some(comment => + (comment.body || '').includes('') ); if (workflowCommentExists) { @@ -40,7 +46,7 @@ jobs: } // Check if maintainers are already mentioned in PR body or comments - const allText = prBody + '\n' + comments.data.map(c => c.body).join('\n'); + const allText = prBody + '\n' + comments.map(c => c.body || '').join('\n'); const toMention = maintainers.filter(user => !allText.includes(`@${user}`) From e342a832ea007fc6774f4c5f0362769adecfe0c7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Jun 2026 12:45:42 +0000 Subject: [PATCH 3/5] Harden mention workflow for forked PRs --- .github/workflows/mention-reality-data-client-changes.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mention-reality-data-client-changes.yml b/.github/workflows/mention-reality-data-client-changes.yml index 2bc4e498..63edc934 100644 --- a/.github/workflows/mention-reality-data-client-changes.yml +++ b/.github/workflows/mention-reality-data-client-changes.yml @@ -15,6 +15,7 @@ on: jobs: mention_maintainers: + if: github.event.pull_request.head.repo.fork == false runs-on: ubuntu-latest permissions: issues: write From 46c3f32b502cb0aaa818c527467167302c9a8b96 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Jun 2026 12:46:20 +0000 Subject: [PATCH 4/5] Use safer pull_request trigger for mention workflow --- .github/workflows/mention-reality-data-client-changes.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mention-reality-data-client-changes.yml b/.github/workflows/mention-reality-data-client-changes.yml index 63edc934..af89eeba 100644 --- a/.github/workflows/mention-reality-data-client-changes.yml +++ b/.github/workflows/mention-reality-data-client-changes.yml @@ -1,7 +1,7 @@ name: Mention reality-data-client maintainers on: - pull_request_target: + pull_request: types: - opened - reopened @@ -15,7 +15,7 @@ on: jobs: mention_maintainers: - if: github.event.pull_request.head.repo.fork == false + if: ${{ !github.event.pull_request.head.repo.fork }} runs-on: ubuntu-latest permissions: issues: write From 45cdbc1007ed8d3319f2194f80903d1f322c2e30 Mon Sep 17 00:00:00 2001 From: dbiguenet <110406974+dbiguenet@users.noreply.github.com> Date: Tue, 4 Aug 2026 09:21:23 +0200 Subject: [PATCH 5/5] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/mention-reality-data-client-changes.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mention-reality-data-client-changes.yml b/.github/workflows/mention-reality-data-client-changes.yml index af89eeba..f49cbbc1 100644 --- a/.github/workflows/mention-reality-data-client-changes.yml +++ b/.github/workflows/mention-reality-data-client-changes.yml @@ -19,6 +19,7 @@ jobs: runs-on: ubuntu-latest permissions: issues: write + pull-requests: read steps: - name: Check if maintainers are already mentioned id: check_mentioned