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

Update 2022-06-24-headspace.md #11425

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
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
a7ed042
Process DMCA request
Jun 21, 2022
8093cc5
Merge pull request #11393 from github/updates
dmca-sync-bot Jun 21, 2022
4b98687
Process DMCA request
Jun 21, 2022
faf7da0
Merge pull request #11394 from github/updates
dmca-sync-bot Jun 21, 2022
97fcf29
Process DMCA request
Jun 21, 2022
98d5973
Merge pull request #11395 from github/updates
dmca-sync-bot Jun 21, 2022
8e49ae3
Process DMCA request
Jun 21, 2022
53ab5e7
Merge pull request #11396 from github/updates
dmca-sync-bot Jun 21, 2022
efc5262
Process DMCA request
Jun 21, 2022
bd40755
Merge pull request #11397 from github/updates
dmca-sync-bot Jun 21, 2022
43a6e00
Process DMCA request
Jun 21, 2022
cedd62a
Merge pull request #11398 from github/updates
dmca-sync-bot Jun 21, 2022
708dd15
Process DMCA request
Jun 21, 2022
e65ee31
Merge pull request #11399 from github/updates
dmca-sync-bot Jun 21, 2022
86d5a14
Process DMCA request
Jun 21, 2022
78234e9
Merge pull request #11400 from github/updates
dmca-sync-bot Jun 21, 2022
dc0a601
Process DMCA request
Jun 21, 2022
73e6509
Merge pull request #11401 from github/updates
dmca-sync-bot Jun 21, 2022
eb5a117
Process DMCA request
Jun 21, 2022
168dff4
Merge pull request #11402 from github/updates
dmca-sync-bot Jun 21, 2022
2f15501
Process DMCA request
Jun 21, 2022
3f513b7
Merge pull request #11403 from github/updates
dmca-sync-bot Jun 21, 2022
fa510a4
Process DMCA request
Jun 21, 2022
e10ce30
Merge pull request #11404 from github/updates
dmca-sync-bot Jun 21, 2022
9aa917c
Process DMCA request
Jun 21, 2022
55bc326
Merge pull request #11405 from github/updates
dmca-sync-bot Jun 21, 2022
d4548dd
Process DMCA request
Jun 21, 2022
455207c
Merge pull request #11406 from github/updates
dmca-sync-bot Jun 21, 2022
523313b
Process DMCA request
Jun 22, 2022
3ae514b
Merge pull request #11407 from github/updates
dmca-sync-bot Jun 22, 2022
c8225d3
Process DMCA request
Jun 22, 2022
4b4d0e8
Merge pull request #11408 from github/updates
dmca-sync-bot Jun 22, 2022
ce1a080
Process DMCA request
Jun 22, 2022
d4c480b
Merge pull request #11409 from github/updates
dmca-sync-bot Jun 22, 2022
314b019
Process DMCA request
Jun 22, 2022
1cb055e
Merge pull request #11410 from github/updates
dmca-sync-bot Jun 22, 2022
ae1be20
Process DMCA request
Jun 22, 2022
bea6ce3
Merge pull request #11411 from github/updates
dmca-sync-bot Jun 22, 2022
faa1abd
Process DMCA request
Jun 22, 2022
559c3b6
Merge pull request #11412 from github/updates
dmca-sync-bot Jun 22, 2022
7cec40e
Process DMCA request
Jun 23, 2022
ef6c6b6
Merge pull request #11413 from github/updates
dmca-sync-bot Jun 23, 2022
6ce812b
Process DMCA request
Jun 23, 2022
d2714f1
Merge pull request #11414 from github/updates
dmca-sync-bot Jun 23, 2022
126a81d
Process DMCA request
Jun 23, 2022
efa523e
Merge pull request #11415 from github/updates
dmca-sync-bot Jun 23, 2022
c7852a6
Process DMCA request
Jun 23, 2022
22a3896
Merge pull request #11416 from github/updates
dmca-sync-bot Jun 23, 2022
2fb9ce8
Process DMCA request
Jun 23, 2022
e7ffcea
Merge pull request #11417 from github/updates
dmca-sync-bot Jun 23, 2022
a34346d
Process DMCA request
Jun 23, 2022
bcbba1a
Merge pull request #11418 from github/updates
dmca-sync-bot Jun 23, 2022
7b5e83a
Process DMCA request
Jun 23, 2022
e6e6762
Merge pull request #11419 from github/updates
dmca-sync-bot Jun 23, 2022
f522547
Process DMCA request
Jun 23, 2022
c4b79db
Merge pull request #11420 from github/updates
dmca-sync-bot Jun 23, 2022
05c6651
Process DMCA request
Jun 23, 2022
d2b39b2
Merge pull request #11421 from github/updates
dmca-sync-bot Jun 23, 2022
48aa98a
Process DMCA request
Jun 23, 2022
7f665a4
Merge pull request #11422 from github/updates
dmca-sync-bot Jun 23, 2022
0ca47f1
Process DMCA request
Jun 24, 2022
b92981c
Merge pull request #11423 from github/updates
dmca-sync-bot Jun 24, 2022
a0ceeb6
Process DMCA request
Jun 24, 2022
ffe665e
Merge pull request #11424 from github/updates
dmca-sync-bot Jun 24, 2022
68064df
Update 2022-06-24-headspace.md
Waterburner Jun 24, 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