Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pls delete this #11391

Open
wants to merge 10,000 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
7313003
Merge pull request #11265 from github/updates
dmca-sync-bot Jun 3, 2022
8343502
Process DMCA request
Jun 3, 2022
24659e3
Merge pull request #11266 from github/updates
dmca-sync-bot Jun 3, 2022
d59c156
Process DMCA request
Jun 3, 2022
bca8e42
Merge pull request #11267 from github/updates
dmca-sync-bot Jun 3, 2022
e58e900
Process DMCA request
Jun 3, 2022
3669778
Merge pull request #11268 from github/updates
dmca-sync-bot Jun 3, 2022
ff23be1
Process DMCA request
Jun 3, 2022
f626918
Merge pull request #11269 from github/updates
dmca-sync-bot Jun 3, 2022
74be33b
Process DMCA request
Jun 3, 2022
47e66e3
Merge pull request #11270 from github/updates
dmca-sync-bot Jun 3, 2022
b7d32e2
Process DMCA request
Jun 3, 2022
51c0e2b
Merge pull request #11271 from github/updates
dmca-sync-bot Jun 3, 2022
5509d2f
Process DMCA request
Jun 3, 2022
1b43951
Merge pull request #11272 from github/updates
dmca-sync-bot Jun 3, 2022
60f28a7
Process DMCA request
Jun 3, 2022
9693518
Merge pull request #11273 from github/updates
dmca-sync-bot Jun 3, 2022
851b845
Process DMCA request
Jun 6, 2022
e186b03
Merge pull request #11274 from github/updates
dmca-sync-bot Jun 6, 2022
bae4069
Process DMCA request
Jun 6, 2022
8b6a92f
Merge pull request #11275 from github/updates
dmca-sync-bot Jun 6, 2022
e598559
Process DMCA request
Jun 6, 2022
2467db5
Merge pull request #11276 from github/updates
dmca-sync-bot Jun 6, 2022
86975fa
Process DMCA request
Jun 6, 2022
83ffe3a
Merge pull request #11277 from github/updates
dmca-sync-bot Jun 6, 2022
250c7f5
Process DMCA request
Jun 6, 2022
96ffcb4
Merge pull request #11278 from github/updates
dmca-sync-bot Jun 6, 2022
c323eaf
Process DMCA request
Jun 6, 2022
ecf35d4
Merge pull request #11279 from github/updates
dmca-sync-bot Jun 6, 2022
f3ad4ad
Process DMCA request
Jun 6, 2022
8d8b28e
Merge pull request #11280 from github/updates
dmca-sync-bot Jun 6, 2022
963a74f
Process DMCA request
Jun 6, 2022
96ee681
Merge pull request #11281 from github/updates
dmca-sync-bot Jun 6, 2022
1cdbdb0
Process DMCA request
Jun 6, 2022
0703a1d
Merge pull request #11282 from github/updates
dmca-sync-bot Jun 6, 2022
56fada7
Process DMCA request
Jun 6, 2022
28ff13c
Merge pull request #11283 from github/updates
dmca-sync-bot Jun 6, 2022
f463c75
Process DMCA request
Jun 6, 2022
f86d1fc
Merge pull request #11284 from github/updates
dmca-sync-bot Jun 6, 2022
24be37c
Process DMCA request
Jun 6, 2022
97d4357
Merge pull request #11285 from github/updates
dmca-sync-bot Jun 6, 2022
09eca19
Process DMCA request
Jun 7, 2022
ed64228
Merge pull request #11286 from github/updates
dmca-sync-bot Jun 7, 2022
d2697a7
Process DMCA request
Jun 7, 2022
ba1aa0e
Merge pull request #11287 from github/updates
dmca-sync-bot Jun 7, 2022
1630616
Process DMCA request
Jun 7, 2022
08278cb
Merge pull request #11288 from github/updates
dmca-sync-bot Jun 7, 2022
fc17ca7
Process DMCA request
Jun 7, 2022
3898802
Merge pull request #11289 from github/updates
dmca-sync-bot Jun 7, 2022
98c9a05
Process DMCA request
Jun 7, 2022
cacfe9f
Merge pull request #11290 from github/updates
dmca-sync-bot Jun 7, 2022
496f635
Process DMCA request
Jun 7, 2022
4e644ec
Merge pull request #11291 from github/updates
dmca-sync-bot Jun 7, 2022
56e0568
Process DMCA request
Jun 7, 2022
8f4edd3
Merge pull request #11292 from github/updates
dmca-sync-bot Jun 7, 2022
a39314d
Process DMCA request
Jun 7, 2022
e1249dc
Merge pull request #11293 from github/updates
dmca-sync-bot Jun 7, 2022
c93fd32
Process DMCA request
Jun 7, 2022
2e3ca89
Merge pull request #11294 from github/updates
dmca-sync-bot Jun 7, 2022
8573a52
Process DMCA request
Jun 7, 2022
02aed0c
Merge pull request #11295 from github/updates
dmca-sync-bot Jun 7, 2022
099bb3e
Process DMCA request
Jun 8, 2022
242c7fb
Merge pull request #11297 from github/updates
dmca-sync-bot Jun 8, 2022
06072f0
Process DMCA request
Jun 8, 2022
68d7415
Merge pull request #11298 from github/updates
dmca-sync-bot Jun 8, 2022
29377db
Process DMCA request
Jun 8, 2022
7eb6dca
Merge pull request #11299 from github/updates
dmca-sync-bot Jun 8, 2022
c8e5a87
Process DMCA request
Jun 8, 2022
a843f59
Merge pull request #11300 from github/updates
dmca-sync-bot Jun 8, 2022
86644d9
Process DMCA request
Jun 9, 2022
fdd1489
Merge pull request #11301 from github/updates
dmca-sync-bot Jun 9, 2022
1e85446
Process DMCA request
Jun 9, 2022
18ac9eb
Merge pull request #11302 from github/updates
dmca-sync-bot Jun 9, 2022
c2cbdb7
Process DMCA request
Jun 9, 2022
081f554
Merge pull request #11303 from github/updates
dmca-sync-bot Jun 9, 2022
ee88a16
Process DMCA request
Jun 9, 2022
1fafce1
Merge pull request #11304 from github/updates
dmca-sync-bot Jun 9, 2022
e9125b3
Process DMCA request
Jun 9, 2022
df686fd
Merge pull request #11305 from github/updates
dmca-sync-bot Jun 9, 2022
8e6736e
Process DMCA request
Jun 9, 2022
a9dc35b
Merge pull request #11306 from github/updates
dmca-sync-bot Jun 9, 2022
dfb97ca
Process DMCA request
Jun 9, 2022
d41726b
Merge pull request #11307 from github/updates
dmca-sync-bot Jun 9, 2022
bff6540
Process DMCA request
Jun 9, 2022
8b38d06
Merge pull request #11308 from github/updates
dmca-sync-bot Jun 9, 2022
5cb07f5
Process DMCA request
Jun 9, 2022
13801b3
Merge pull request #11309 from github/updates
dmca-sync-bot Jun 9, 2022
8fa54db
Process DMCA request
Jun 9, 2022
3626de5
Merge pull request #11310 from github/updates
dmca-sync-bot Jun 9, 2022
6008133
Process DMCA request
Jun 9, 2022
cce2e53
Merge pull request #11311 from github/updates
dmca-sync-bot Jun 9, 2022
5bec056
Process DMCA request
Jun 9, 2022
61ece83
Merge pull request #11312 from github/updates
dmca-sync-bot Jun 9, 2022
dd4e29e
Process DMCA request
Jun 9, 2022
beb4eca
Merge pull request #11313 from github/updates
dmca-sync-bot Jun 9, 2022
b32cfb4
Process DMCA request
Jun 10, 2022
ecd98c3
Merge pull request #11314 from github/updates
dmca-sync-bot Jun 10, 2022
bd764ca
Process DMCA request
Jun 10, 2022
4bcb8fb
Merge pull request #11315 from github/updates
dmca-sync-bot Jun 10, 2022
c64b86b
Process DMCA request
Jun 10, 2022
f7fde48
Merge pull request #11316 from github/updates
dmca-sync-bot Jun 10, 2022
6806dfa
Process DMCA request
Jun 10, 2022
2082fcd
Merge pull request #11317 from github/updates
dmca-sync-bot Jun 10, 2022
7e8f916
Process DMCA request
Jun 10, 2022
e182f4a
Merge pull request #11318 from github/updates
dmca-sync-bot Jun 10, 2022
96fb822
Process DMCA request
Jun 10, 2022
725c993
Merge pull request #11319 from github/updates
dmca-sync-bot Jun 10, 2022
3932042
Process DMCA request
Jun 10, 2022
5c05113
Merge pull request #11320 from github/updates
dmca-sync-bot Jun 10, 2022
8679dfc
Process DMCA request
Jun 13, 2022
ce2cbff
Merge pull request #11321 from github/updates
dmca-sync-bot Jun 13, 2022
3cf7ec1
Process DMCA request
Jun 13, 2022
9698228
Merge pull request #11322 from github/updates
dmca-sync-bot Jun 13, 2022
6330546
Process DMCA request
Jun 13, 2022
5701481
Merge pull request #11323 from github/updates
dmca-sync-bot Jun 13, 2022
8e56ac8
Process DMCA request
Jun 13, 2022
26fc4a4
Merge pull request #11324 from github/updates
dmca-sync-bot Jun 13, 2022
4bdfe12
Process DMCA request
Jun 13, 2022
9aa9695
Merge pull request #11325 from github/updates
dmca-sync-bot Jun 13, 2022
7890f69
Process DMCA request
Jun 13, 2022
86eb2b2
Merge pull request #11326 from github/updates
dmca-sync-bot Jun 13, 2022
9daf5fd
Process DMCA request
Jun 13, 2022
ab785fb
Merge pull request #11327 from github/updates
dmca-sync-bot Jun 13, 2022
dd9a7e3
Process DMCA request
Jun 13, 2022
b3d8177
Merge pull request #11328 from github/updates
dmca-sync-bot Jun 13, 2022
04f43a8
Process DMCA request
Jun 13, 2022
2ec5e23
Merge pull request #11329 from github/updates
dmca-sync-bot Jun 13, 2022
6dde582
Process DMCA request
Jun 13, 2022
518991f
Merge pull request #11330 from github/updates
dmca-sync-bot Jun 13, 2022
70d43fb
Process DMCA request
Jun 13, 2022
1708993
Merge pull request #11331 from github/updates
dmca-sync-bot Jun 13, 2022
28a2f0b
Process DMCA request
Jun 13, 2022
777e04b
Merge pull request #11332 from github/updates
dmca-sync-bot Jun 13, 2022
cf68fb5
Process DMCA request
Jun 13, 2022
4e416a9
Merge pull request #11333 from github/updates
dmca-sync-bot Jun 13, 2022
a1078f1
Process DMCA request
Jun 13, 2022
e30114e
Merge pull request #11334 from github/updates
dmca-sync-bot Jun 13, 2022
7b1d29f
Process DMCA request
Jun 13, 2022
06c095a
Merge pull request #11335 from github/updates
dmca-sync-bot Jun 13, 2022
baeab5c
Process DMCA request
Jun 13, 2022
ba8e516
Merge pull request #11336 from github/updates
dmca-sync-bot Jun 13, 2022
30da875
Process DMCA request
Jun 13, 2022
b4c764d
Merge pull request #11337 from github/updates
dmca-sync-bot Jun 13, 2022
5dd0774
Process DMCA request
Jun 13, 2022
4498ddb
Merge pull request #11338 from github/updates
dmca-sync-bot Jun 13, 2022
6ba7b63
Process DMCA request
Jun 13, 2022
3630fdf
Merge pull request #11339 from github/updates
dmca-sync-bot Jun 13, 2022
b24727b
Process DMCA request
Jun 13, 2022
02f12c8
Merge pull request #11340 from github/updates
dmca-sync-bot Jun 13, 2022
346ff97
Process DMCA request
Jun 14, 2022
24f99eb
Merge pull request #11341 from github/updates
dmca-sync-bot Jun 14, 2022
076a363
Process DMCA request
Jun 14, 2022
132024d
Merge pull request #11342 from github/updates
dmca-sync-bot Jun 14, 2022
35efe14
Process DMCA request
Jun 14, 2022
a94839d
Merge pull request #11343 from github/updates
dmca-sync-bot Jun 14, 2022
c3095d5
Process DMCA request
Jun 14, 2022
4a037d3
Merge pull request #11344 from github/updates
dmca-sync-bot Jun 14, 2022
42b9748
Process DMCA request
Jun 14, 2022
08f680b
Merge pull request #11345 from github/updates
dmca-sync-bot Jun 14, 2022
0dd72d8
Process DMCA request
Jun 14, 2022
cdff343
Merge pull request #11346 from github/updates
dmca-sync-bot Jun 14, 2022
cd03fcc
Process DMCA request
Jun 14, 2022
4433781
Merge pull request #11347 from github/updates
dmca-sync-bot Jun 14, 2022
e2ee517
Process DMCA request
Jun 14, 2022
62a5e70
Merge pull request #11348 from github/updates
dmca-sync-bot Jun 14, 2022
f624821
Process DMCA request
Jun 14, 2022
05412b0
Merge pull request #11349 from github/updates
dmca-sync-bot Jun 14, 2022
7db3195
Process DMCA request
Jun 14, 2022
6b31187
Merge pull request #11350 from github/updates
dmca-sync-bot Jun 14, 2022
2f5d44a
Process DMCA request
Jun 14, 2022
5fcd72c
Merge pull request #11351 from github/updates
dmca-sync-bot Jun 14, 2022
366a0a8
Process DMCA request
Jun 14, 2022
e3ab1e4
Merge pull request #11352 from github/updates
dmca-sync-bot Jun 14, 2022
ed77725
Process DMCA request
Jun 15, 2022
e84951b
Merge pull request #11353 from github/updates
dmca-sync-bot Jun 15, 2022
3657b7a
Process DMCA request
Jun 15, 2022
7020789
Merge pull request #11354 from github/updates
dmca-sync-bot Jun 15, 2022
c894ef5
Process DMCA request
Jun 15, 2022
3399bf1
Merge pull request #11355 from github/updates
dmca-sync-bot Jun 15, 2022
16aa803
Process DMCA request
Jun 16, 2022
fa9d52f
Merge pull request #11356 from github/updates
dmca-sync-bot Jun 16, 2022
febd1e2
Process DMCA request
Jun 16, 2022
11ef2da
Merge pull request #11357 from github/updates
dmca-sync-bot Jun 16, 2022
48e1628
Process DMCA request
Jun 16, 2022
fa76010
Merge pull request #11358 from github/updates
dmca-sync-bot Jun 16, 2022
b0119bb
Process DMCA request
Jun 16, 2022
588412c
Merge pull request #11359 from github/updates
dmca-sync-bot Jun 16, 2022
efe05c3
Process DMCA request
Jun 16, 2022
6a1109e
Merge pull request #11360 from github/updates
dmca-sync-bot Jun 16, 2022
527c0ba
Process DMCA request
Jun 16, 2022
460174a
Merge pull request #11361 from github/updates
dmca-sync-bot Jun 16, 2022
70f701d
Process DMCA request
Jun 16, 2022
e3af0a6
Merge pull request #11362 from github/updates
dmca-sync-bot Jun 16, 2022
4b9ebf9
Process DMCA request
Jun 16, 2022
d051da5
Merge pull request #11363 from github/updates
dmca-sync-bot Jun 16, 2022
16d277c
Process DMCA request
Jun 16, 2022
2615b38
Merge pull request #11364 from github/updates
dmca-sync-bot Jun 16, 2022
b5435e3
Process DMCA request
Jun 16, 2022
78ab652
Merge pull request #11365 from github/updates
dmca-sync-bot Jun 16, 2022
148eaaa
Process DMCA request
Jun 16, 2022
b3995ff
Merge pull request #11366 from github/updates
dmca-sync-bot Jun 16, 2022
418f2c2
Process DMCA request
Jun 16, 2022
54fcca6
Merge pull request #11367 from github/updates
dmca-sync-bot Jun 16, 2022
90e7628
Process DMCA request
Jun 16, 2022
392908a
Merge pull request #11368 from github/updates
dmca-sync-bot Jun 16, 2022
2ee195c
Process DMCA request
Jun 16, 2022
b31d233
Merge pull request #11369 from github/updates
dmca-sync-bot Jun 16, 2022
37e05ee
Process DMCA request
Jun 16, 2022
78f99f9
Merge pull request #11370 from github/updates
dmca-sync-bot Jun 16, 2022
50c6f16
Process DMCA request
Jun 16, 2022
3f4fb75
Merge pull request #11371 from github/updates
dmca-sync-bot Jun 16, 2022
62e48e3
Process DMCA request
Jun 16, 2022
a7d723b
Merge pull request #11372 from github/updates
dmca-sync-bot Jun 16, 2022
c59e92c
Process DMCA request
Jun 17, 2022
f2c2820
Merge pull request #11373 from github/updates
dmca-sync-bot Jun 17, 2022
01e48f0
Process DMCA request
Jun 17, 2022
e39c7b2
Merge pull request #11374 from github/updates
dmca-sync-bot Jun 17, 2022
7d9211d
Process DMCA request
Jun 17, 2022
ee281d6
Merge pull request #11375 from github/updates
dmca-sync-bot Jun 17, 2022
9835dd2
Process DMCA request
Jun 17, 2022
7047e0c
Merge pull request #11376 from github/updates
dmca-sync-bot Jun 17, 2022
f0c4c0d
Process DMCA request
Jun 17, 2022
67b25ba
Merge pull request #11377 from github/updates
dmca-sync-bot Jun 17, 2022
d37ae42
Process DMCA request
Jun 17, 2022
27fdaf4
Process DMCA request
Jun 17, 2022
099ce9c
Merge pull request #11378 from github/updates
dmca-sync-bot Jun 17, 2022
2a9f679
Merge pull request #11379 from github/updates
dmca-sync-bot Jun 17, 2022
1835ce7
Process DMCA request
Jun 17, 2022
e9eee35
Merge pull request #11380 from github/updates
dmca-sync-bot Jun 17, 2022
2e6085f
Process DMCA request
Jun 17, 2022
dd02468
Merge pull request #11381 from github/updates
dmca-sync-bot Jun 17, 2022
1d17c5b
Process DMCA request
Jun 17, 2022
acc9573
Merge pull request #11382 from github/updates
dmca-sync-bot Jun 17, 2022
5b9e105
Process DMCA request
Jun 17, 2022
8baf683
Merge pull request #11383 from github/updates
dmca-sync-bot Jun 17, 2022
6d62b62
Process DMCA request
Jun 17, 2022
24371fb
Merge pull request #11384 from github/updates
dmca-sync-bot Jun 17, 2022
c32762d
Process DMCA request
Jun 17, 2022
bdcb71e
Merge pull request #11385 from github/updates
dmca-sync-bot Jun 17, 2022
f5414fa
Process DMCA request
Jun 20, 2022
72db6c6
Merge pull request #11386 from github/updates
dmca-sync-bot Jun 20, 2022
3603e5b
Process DMCA request
Jun 20, 2022
7b13063
Merge pull request #11387 from github/updates
dmca-sync-bot Jun 20, 2022
cd26c75
Process DMCA request
Jun 20, 2022
a0058cd
Merge pull request #11388 from github/updates
dmca-sync-bot Jun 20, 2022
b907687
Process DMCA request
Jun 20, 2022
9c5688d
Merge pull request #11389 from github/updates
dmca-sync-bot Jun 20, 2022
00d45cb
Process DMCA request
Jun 20, 2022
4d3d505
Merge pull request #11390 from github/updates
dmca-sync-bot Jun 20, 2022
03b51e4
DELETE IT!!!
japrozs Jun 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
If you are looking to file or dispute a takedown notice by posting to this repository, please STOP :stop_sign: because we do not accept Pull Requests or other contributions to this repository.

Read on to learn about the available paths forward.

Please note that re-posting the exact same content that was the subject of a takedown notice without following the proper process ([outlined below](#responding-to-a-dmca-notice)) is a violation of GitHub’s [DMCA Policy](https://docs.github.com/en/github/site-policy/dmca-takedown-policy) and [Terms of Service](https://docs.github.com/en/github/site-policy/github-acceptable-use-policies). If you commit or post content to this repository that violates our Terms of Service, we will delete that content and may suspend access to your account as well.


#### Submitting a DMCA Notice

If you are a copyright owner wishing to submit a takedown notice, read our [DMCA Policy](https://docs.github.com/en/free-pro-team@latest/github/site-policy/dmca-takedown-policy) and [Guide to Submitting a DMCA Takedown Notice](https://docs.github.com/en/free-pro-team@latest/github/site-policy/guide-to-submitting-a-dmca-takedown-notice). You can submit the actual notice using our special [Copyright Claims Contact Form](https://github.com/contact/dmca).


#### Responding to a DMCA Notice

If you are the owner of a repository that has been taken down, you have two main options:

- Do you want to [make changes](https://docs.github.com/en/free-pro-team@latest/github/site-policy/dmca-takedown-policy#c-what-if-i-inadvertently-missed-the-window-to-make-changes) to the repository that would remove the allegedly infringing content? If that is possible in your case, [contact us](https://support.github.com/contact) to let us know that you would like to make the changes.

- Do you want to formally dispute the action by [submitting a counter notice](https://docs.github.com/en/free-pro-team@latest/github/site-policy/guide-to-submitting-a-dmca-counter-notice)? Maybe the person sending the takedown notice does not hold the copyright or did not realize that you have a license or made some other mistake in their takedown notice. If you believe your content on GitHub was mistakenly disabled by a DMCA takedown request, you have the right to contest the takedown by [submitting a counter notice](https://docs.github.com/en/free-pro-team@latest/github/site-policy/guide-to-submitting-a-dmca-counter-notice). If you do, we will wait 10-14 days and then re-enable your content unless the copyright owner initiates a legal action before then.

If you do not want to make changes or dispute the notice, but still have general concerns about the copyright laws and how they apply in your case, know that GitHub and developers have the opportunity and a voice to advocate for changes in law and public policy to better support software development. We are constantly looking to [advocate for developers](https://github.blog/category/company/policy/), so feel free to [reach out](https://support.github.com/contact) and let us know your concerns. We also encourage you to [learn more about copyright and speak up](https://docs.github.com/en/free-pro-team@latest/github/site-policy/dmca-takedown-policy#learn-more-and-speak-up) by reaching out to the Copyright Office or your local lawmakers to voice your concerns.
103 changes: 103 additions & 0 deletions .github/script/validate-filepaths/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import walkSync from "walk-sync";
import {
isFileInCorrectFolder,
isFilepathDateValid,
getNoticeCategory,
} from "./utils/validators.js";
import _ from "lodash";
const { partition } = _;
import { setOutput } from "@actions/core";

const { CHANGED_FILES } = process.env;
const dmcaFilesChangedInPr = CHANGED_FILES.split("\n").filter(
isFileInsideAYearFolder
);

const [prChangedFilesWithValidDates, prChangedFilesWithInvalidDates] =
partition(dmcaFilesChangedInPr, isFilepathDateValid);
const [prChangedFilesinCorrectFolder, prChangedFilesNotInCorrectFolder] =
partition(prChangedFilesWithValidDates, isFileInCorrectFolder);

let commentBody = `Thanks for the PR!
# Files changed in this PR
`;
let commentCopyForFilesChangedInThisPr =
prChangedFilesWithInvalidDates.length ||
prChangedFilesNotInCorrectFolder.length
? ` I've scanned the changed files and found some issues to double check:`
: ` All DMCA notices changed in this PR appear to have valid YYYY-MM-DD dates and seem to be in the correct folder.`;

commentCopyForFilesChangedInThisPr += prChangedFilesWithInvalidDates.length
? `\n\n**Notices that don't contain a date that conforms to the YYYY-MM-DD format:**\n\n${prChangedFilesWithInvalidDates
.map((file) => `- ${file}`)
.join("\n")}`
: "";

commentCopyForFilesChangedInThisPr += prChangedFilesNotInCorrectFolder.length
? `\n\n**Notices that might need to be moved to the correct year/month folder:**\n\n${prChangedFilesNotInCorrectFolder
.map((file) => `- ${file}`)
.join("\n")}`
: "";

let commentCopyForCategoriesOfFilesChangedInThisPr = `\n\n**Notices appear to fall into the following categories:**
| Filepath | Category |
| --- | --- |
${dmcaFilesChangedInPr
.map((filepath) => {
const noticeCategory = getNoticeCategory(filepath);
return "| " + filepath + " | " + noticeCategory + " |";
})
.join("\n")}
`;

commentBody += commentCopyForFilesChangedInThisPr;
commentBody += commentCopyForCategoriesOfFilesChangedInThisPr;

const filesInDmcaNoticeFolders = walkSync(".", { directories: false })
.filter(isFileInsideAYearFolder)
.filter((file) => {
const isFileAmongChangedFiles = dmcaFilesChangedInPr.includes(file);
return !isFileAmongChangedFiles; // filter out files that are in the changed files list
});

const [filesWithValidDates, filesWithInvalidDates] = partition(
filesInDmcaNoticeFolders,
isFilepathDateValid
);
const [filesInCorrectFolder, filesNotInCorrectFolder] = partition(
filesWithValidDates,
isFileInCorrectFolder
);

let commentCopyForAllDmcaNoticesInRepo =
filesWithInvalidDates.length || filesNotInCorrectFolder.length
? `\n# Other Files in Repo\nI've also scanned the rest of the repo and found some files to double check:`
: `\n# Other Files in Repo\nThe other DMCA notices in the repo appear to have valid YYYY-MM-DD dates and seem to be in the correct folder.`;

const invalidDatesList = filesWithInvalidDates.length
? `\n\n**Notices that don't contain a date that conforms to the YYYY-MM-DD format:**\n\n${filesWithInvalidDates
.map((file) => `- ${file}`)
.join("\n")}`
: "";

const incorrectFolderList = filesNotInCorrectFolder.length
? `\n\n**Notices that might need to be moved to the correct year/month folder:**\n\n${filesNotInCorrectFolder
.map((file) => `- ${file}`)
.join("\n")}`
: "";

commentCopyForAllDmcaNoticesInRepo += invalidDatesList;
commentCopyForAllDmcaNoticesInRepo += incorrectFolderList;

commentBody += commentCopyForAllDmcaNoticesInRepo;

setOutput("COMMENT_BODY", commentBody);

/**
* Returns true if the file is in a folder at the root directory of the repo of the form YYYY
* @param {string} filepath
* @returns {boolean}
*/
function isFileInsideAYearFolder(filepath) {
return filepath.match(/^\d{4}/) !== null;
}
Loading