Skip to content

Commit

Permalink
select2
Browse files Browse the repository at this point in the history
  • Loading branch information
rscohn2 committed Jun 13, 2024
1 parent bdfa397 commit b569c93
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/scripts/domain-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ function matchesPattern(domain, filePaths) {
}

async function prFiles(github, context) {
const pr = context.payload.pull_request;
if (!pr) {
return [];
}
const response = await github.rest.pulls.listFiles({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number
pull_number: context.payload.pull_request.number
});
const prFiles = response.data.map(file => file.filename);
return prFiles;
}

module.exports = async ({github, context, domain}) => {
if (!context.payload.pull_request) {
console.log('Not a pull request. Testing all domains.');
return true;
}
const files = await prFiles(github, context);
const match = matchesPattern(domain, files);
console.log("Domain: ", domain)
Expand Down

0 comments on commit b569c93

Please sign in to comment.