File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,20 +59,20 @@ jobs:
5959 console.log(`Committer: ${committer}`);
6060
6161 // Check if this is a Copybara commit or has a pull request reference
62+ const prRegex = /Merges?:?\s+(?:https:\/\/github\.com\/google\/adk-python\/pull\/|#)(\d+)/i;
6263 const isCopybara = committer === 'Copybara-Service' ||
6364 commit.author?.email === 'genai-sdk-bot@google.com' ||
6465 message.includes('GitOrigin-RevId:') ||
6566 message.includes('PiperOrigin-RevId:') ||
66- /Merge:?\s+https:\/\/github\.com\/google\/adk-python\/pull\/(\d+)/ .test(message);
67+ prRegex .test(message);
6768
6869 if (!isCopybara) {
6970 console.log('Not a Copybara commit, skipping');
7071 continue;
7172 }
7273
7374 // Extract PR number from commit message
74- // Pattern matches both "Merge https://..." and "Merge: https://..."
75- const prMatch = message.match(/Merge:?\s+https:\/\/github\.com\/google\/adk-python\/pull\/(\d+)/);
75+ const prMatch = message.match(prRegex);
7676
7777 if (!prMatch) {
7878 console.log('No PR number found in Copybara commit message');
You can’t perform that action at this time.
0 commit comments