Skip to content

Commit

Permalink
test-pr-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Jul 27, 2024
1 parent b479b70 commit b8e0a01
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Test PR
on:

push:
branches: ["main"]
branches: ["test-pr-changes"]

pull_request:
branches: ["main"]
branches: ["test-pr-changes"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
14 changes: 11 additions & 3 deletions test/test-pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,20 @@ const getPullRequestChanges = async () => {
const test = async () => {

const prChanges = await getPullRequestChanges();
// prChanges.push('ignore.js');
console.log('prChanges', prChanges);

const filter = (file) => {
// console.log(file.sourcePath);
// const filter = (file) => file.sourcePath.includes('/branch');
// const filter = {
// '**/ignore/**': true
// };

return true;
const filter = (file) => {
for (const p of prChanges) {
if (file.sourcePath.includes(p)) {
return true;
}
}
};

const coverageOptions = {
Expand Down

0 comments on commit b8e0a01

Please sign in to comment.