|
28 | 28 |
|
29 | 29 | // Check if author is a team member or bot |
30 | 30 | if (login === 'opencode-agent[bot]') return; |
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`); |
| 31 | + const teamAssociations = ['OWNER', 'MEMBER', 'COLLABORATOR']; |
| 32 | + if (teamAssociations.includes(pr.author_association)) { |
| 33 | + console.log(`Skipping: ${login} has author association ${pr.author_association}`); |
40 | 34 | return; |
41 | 35 | } |
42 | 36 |
|
@@ -175,15 +169,9 @@ jobs: |
175 | 169 |
|
176 | 170 | // Check if author is a team member or bot |
177 | 171 | if (login === 'opencode-agent[bot]') return; |
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`); |
| 172 | + const teamAssociations = ['OWNER', 'MEMBER', 'COLLABORATOR']; |
| 173 | + if (teamAssociations.includes(pr.author_association)) { |
| 174 | + console.log(`Skipping: ${login} has author association ${pr.author_association}`); |
187 | 175 | return; |
188 | 176 | } |
189 | 177 |
|
|
0 commit comments