|
28 | 28 |
|
29 | 29 | // Check if author is a team member or bot |
30 | 30 | if (login === 'opencode-agent[bot]') return; |
31 | | - const teamAssociations = ['OWNER', 'MEMBER', 'COLLABORATOR']; |
32 | | - if (teamAssociations.includes(pr.author_association)) { |
33 | | - console.log(`Skipping: ${login} has author association ${pr.author_association}`); |
| 31 | + const { data: file } = await github.rest.repos.getContent({ |
| 32 | + owner: context.repo.owner, |
| 33 | + repo: context.repo.repo, |
| 34 | + path: '.github/TEAM_MEMBERS', |
| 35 | + ref: 'dev' |
| 36 | + }); |
| 37 | + const members = Buffer.from(file.content, 'base64').toString().split('\n').map(l => l.trim()).filter(Boolean); |
| 38 | + if (members.includes(login)) { |
| 39 | + console.log(`Skipping: ${login} is a team member`); |
34 | 40 | return; |
35 | 41 | } |
36 | 42 |
|
@@ -169,9 +175,15 @@ jobs: |
169 | 175 |
|
170 | 176 | // Check if author is a team member or bot |
171 | 177 | if (login === 'opencode-agent[bot]') return; |
172 | | - const teamAssociations = ['OWNER', 'MEMBER', 'COLLABORATOR']; |
173 | | - if (teamAssociations.includes(pr.author_association)) { |
174 | | - console.log(`Skipping: ${login} has author association ${pr.author_association}`); |
| 178 | + const { data: file } = await github.rest.repos.getContent({ |
| 179 | + owner: context.repo.owner, |
| 180 | + repo: context.repo.repo, |
| 181 | + path: '.github/TEAM_MEMBERS', |
| 182 | + ref: 'dev' |
| 183 | + }); |
| 184 | + const members = Buffer.from(file.content, 'base64').toString().split('\n').map(l => l.trim()).filter(Boolean); |
| 185 | + if (members.includes(login)) { |
| 186 | + console.log(`Skipping: ${login} is a team member`); |
175 | 187 | return; |
176 | 188 | } |
177 | 189 |
|
|
0 commit comments