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

Create 2023-02-03-bluemoon-china.md #12822

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
0d8fe91
Merge pull request #12694 from github/updates
dmca-sync-bot Jan 9, 2023
a08e8bb
Process DMCA request
Jan 9, 2023
611f1d5
Merge pull request #12695 from github/updates
dmca-sync-bot Jan 9, 2023
74a8537
Process DMCA request
Jan 9, 2023
c7932c6
Merge pull request #12696 from github/updates
dmca-sync-bot Jan 9, 2023
695b57a
Process DMCA request
Jan 9, 2023
9eaa535
Merge pull request #12697 from github/updates
dmca-sync-bot Jan 9, 2023
0648b2b
Process DMCA request
Jan 9, 2023
cafc48b
Merge pull request #12698 from github/updates
dmca-sync-bot Jan 9, 2023
2a5922b
Process DMCA request
Jan 9, 2023
4903710
Merge pull request #12699 from github/updates
dmca-sync-bot Jan 9, 2023
69e5c9a
Process DMCA request
Jan 9, 2023
fcf79a4
Merge pull request #12700 from github/updates
dmca-sync-bot Jan 9, 2023
0d5a24f
Process DMCA request
Jan 9, 2023
ae282ec
Merge pull request #12701 from github/updates
dmca-sync-bot Jan 9, 2023
e126a2e
Process DMCA request
Jan 9, 2023
896e3bf
Merge pull request #12702 from github/updates
dmca-sync-bot Jan 9, 2023
36d9c5b
Process DMCA request
Jan 9, 2023
e5073e3
Merge pull request #12703 from github/updates
dmca-sync-bot Jan 9, 2023
4ee4c99
Process DMCA request
Jan 9, 2023
f860773
Merge pull request #12704 from github/updates
dmca-sync-bot Jan 9, 2023
8273178
Process DMCA request
Jan 9, 2023
104ddd5
Merge pull request #12705 from github/updates
dmca-sync-bot Jan 9, 2023
28cc63b
Process DMCA request
Jan 9, 2023
92c35f1
Merge pull request #12706 from github/updates
dmca-sync-bot Jan 9, 2023
e7bd5c6
Process DMCA request
Jan 9, 2023
d4ddd3f
Merge pull request #12707 from github/updates
dmca-sync-bot Jan 9, 2023
accaa98
Process DMCA request
Jan 9, 2023
595c2c9
Merge pull request #12708 from github/updates
dmca-sync-bot Jan 9, 2023
3838a72
Process DMCA request
Jan 10, 2023
da59d39
Merge pull request #12709 from github/updates
dmca-sync-bot Jan 10, 2023
5481522
Process DMCA request
Jan 10, 2023
6dff39d
Merge pull request #12710 from github/updates
dmca-sync-bot Jan 10, 2023
ae30748
Process DMCA request
Jan 10, 2023
f68ad30
Merge pull request #12711 from github/updates
dmca-sync-bot Jan 10, 2023
f051f9d
Process DMCA request
Jan 10, 2023
ac1f00e
Merge pull request #12712 from github/updates
dmca-sync-bot Jan 10, 2023
9d5d81b
Process DMCA request
Jan 10, 2023
0dffac4
Merge pull request #12713 from github/updates
dmca-sync-bot Jan 10, 2023
41ac119
Process DMCA request
Jan 10, 2023
9a68301
Merge pull request #12714 from github/updates
dmca-sync-bot Jan 10, 2023
88f6b83
Process DMCA request
Jan 10, 2023
5723995
Merge pull request #12715 from github/updates
dmca-sync-bot Jan 10, 2023
b726fef
Process DMCA request
Jan 10, 2023
92388ae
Merge pull request #12716 from github/updates
dmca-sync-bot Jan 10, 2023
364a7e2
Process DMCA request
Jan 10, 2023
f5712de
Merge pull request #12717 from github/updates
dmca-sync-bot Jan 10, 2023
077bc7e
Process DMCA request
Jan 10, 2023
a0ebd26
Merge pull request #12718 from github/updates
dmca-sync-bot Jan 10, 2023
d237f4c
Process DMCA request
Jan 10, 2023
ff9de16
Merge pull request #12719 from github/updates
dmca-sync-bot Jan 10, 2023
1c2daa6
Process DMCA request
Jan 10, 2023
3988a76
Merge pull request #12720 from github/updates
dmca-sync-bot Jan 10, 2023
df3bda4
Process DMCA request
Jan 10, 2023
06d0a94
Merge pull request #12721 from github/updates
dmca-sync-bot Jan 10, 2023
4b8e0d3
Process DMCA request
Jan 10, 2023
df7faae
Merge pull request #12722 from github/updates
dmca-sync-bot Jan 10, 2023
4f51ca8
Process DMCA request
Jan 10, 2023
1aac88f
Merge pull request #12723 from github/updates
dmca-sync-bot Jan 10, 2023
df03816
Process DMCA request
Jan 10, 2023
c074d1d
Merge pull request #12724 from github/updates
dmca-sync-bot Jan 10, 2023
47ac160
Process DMCA request
Jan 11, 2023
8d4b608
Merge pull request #12725 from github/updates
dmca-sync-bot Jan 11, 2023
3f4bfac
Process DMCA request
Jan 11, 2023
a185d20
Merge pull request #12726 from github/updates
dmca-sync-bot Jan 11, 2023
8635257
Process DMCA request
Jan 11, 2023
9c2e472
Merge pull request #12727 from github/updates
dmca-sync-bot Jan 11, 2023
ce3bd56
Process DMCA request
Jan 11, 2023
8de878f
Merge pull request #12728 from github/updates
dmca-sync-bot Jan 11, 2023
202995d
Process DMCA request
Jan 11, 2023
d0b2a78
Merge pull request #12729 from github/updates
dmca-sync-bot Jan 11, 2023
35ac7c1
Process DMCA request
Jan 11, 2023
eda2d6f
Merge pull request #12730 from github/updates
dmca-sync-bot Jan 11, 2023
32cfc24
Process DMCA request
Jan 11, 2023
719f3d8
Merge pull request #12731 from github/updates
dmca-sync-bot Jan 11, 2023
322082c
Process DMCA request
Jan 11, 2023
68dd927
Merge pull request #12732 from github/updates
dmca-sync-bot Jan 11, 2023
79843e7
Process DMCA request
Jan 12, 2023
3950251
Merge pull request #12733 from github/updates
dmca-sync-bot Jan 12, 2023
e677a4e
Process DMCA request
Jan 12, 2023
725fcdb
Merge pull request #12734 from github/updates
dmca-sync-bot Jan 12, 2023
64da9d7
Process DMCA request
Jan 12, 2023
f6ee651
Merge pull request #12735 from github/updates
dmca-sync-bot Jan 12, 2023
f6aac29
Process DMCA request
Jan 12, 2023
d8d9dbc
Merge pull request #12736 from github/updates
dmca-sync-bot Jan 12, 2023
13b493c
Process DMCA request
Jan 12, 2023
a9c5a68
Merge pull request #12737 from github/updates
dmca-sync-bot Jan 12, 2023
1a3d60c
Process DMCA request
Jan 12, 2023
e8b651f
Merge pull request #12738 from github/updates
dmca-sync-bot Jan 12, 2023
56cfb5e
Process DMCA request
Jan 12, 2023
490ec6a
Merge pull request #12739 from github/updates
dmca-sync-bot Jan 12, 2023
d099ec0
Process DMCA request
Jan 12, 2023
d710da8
Merge pull request #12740 from github/updates
dmca-sync-bot Jan 12, 2023
97b501d
Process DMCA request
Jan 12, 2023
aa3e1b9
Merge pull request #12741 from github/updates
dmca-sync-bot Jan 12, 2023
b7fdfb7
Process DMCA request
Jan 12, 2023
164ea91
Merge pull request #12742 from github/updates
dmca-sync-bot Jan 12, 2023
dc84668
Process DMCA request
Jan 12, 2023
c7107c7
Merge pull request #12743 from github/updates
dmca-sync-bot Jan 12, 2023
7c43edc
Process DMCA request
Jan 12, 2023
3df83f3
Merge pull request #12744 from github/updates
dmca-sync-bot Jan 12, 2023
20b4230
Process DMCA request
Jan 12, 2023
14c070e
Merge pull request #12745 from github/updates
dmca-sync-bot Jan 12, 2023
9cdad03
Process DMCA request
Jan 13, 2023
26c8288
Merge pull request #12746 from github/updates
dmca-sync-bot Jan 13, 2023
da65151
Process DMCA request
Jan 13, 2023
b09b2a6
Merge pull request #12747 from github/updates
dmca-sync-bot Jan 13, 2023
d5cb728
Process DMCA request
Jan 13, 2023
f9fba54
Merge pull request #12748 from github/updates
dmca-sync-bot Jan 13, 2023
48da0a7
Process DMCA request
Jan 17, 2023
833840a
Merge pull request #12749 from github/updates
dmca-sync-bot Jan 17, 2023
7462a7f
Process DMCA request
Jan 17, 2023
1822003
Merge pull request #12750 from github/updates
dmca-sync-bot Jan 17, 2023
dc2e890
Process DMCA request
Jan 18, 2023
8e051dd
Merge pull request #12751 from github/updates
dmca-sync-bot Jan 18, 2023
f75440b
Process DMCA request
Jan 18, 2023
fb70855
Merge pull request #12752 from github/updates
dmca-sync-bot Jan 18, 2023
8242ae9
Process DMCA request
Jan 18, 2023
7153151
Merge pull request #12753 from github/updates
dmca-sync-bot Jan 18, 2023
70a4dd1
Process DMCA request
Jan 18, 2023
2f8dae7
Merge pull request #12754 from github/updates
dmca-sync-bot Jan 18, 2023
75ade0f
Process DMCA request
Jan 18, 2023
ffdd40f
Merge pull request #12755 from github/updates
dmca-sync-bot Jan 18, 2023
c913893
Process DMCA request
Jan 18, 2023
a5e705a
Merge pull request #12756 from github/updates
dmca-sync-bot Jan 18, 2023
7a44dbe
Process DMCA request
Jan 18, 2023
d0cc327
Merge pull request #12757 from github/updates
dmca-sync-bot Jan 18, 2023
b94f8d3
Process DMCA request
Jan 18, 2023
349a1f5
Merge pull request #12758 from github/updates
dmca-sync-bot Jan 18, 2023
5f6f978
Process DMCA request
Jan 18, 2023
ea17fd5
Merge pull request #12759 from github/updates
dmca-sync-bot Jan 18, 2023
21e7553
Process DMCA request
Jan 18, 2023
885abb9
Merge pull request #12760 from github/updates
dmca-sync-bot Jan 18, 2023
69f7170
Process DMCA request
Jan 18, 2023
3883544
Merge pull request #12761 from github/updates
dmca-sync-bot Jan 18, 2023
8842190
Process DMCA request
Jan 19, 2023
c72ccc0
Merge pull request #12762 from github/updates
dmca-sync-bot Jan 19, 2023
828c656
Process DMCA request
Jan 19, 2023
964aff0
Merge pull request #12763 from github/updates
dmca-sync-bot Jan 19, 2023
d594919
Process DMCA request
Jan 19, 2023
ed9fb42
Merge pull request #12764 from github/updates
dmca-sync-bot Jan 19, 2023
1163cf9
Process DMCA request
Jan 19, 2023
557c30f
Merge pull request #12765 from github/updates
dmca-sync-bot Jan 19, 2023
0418e17
Process DMCA request
Jan 19, 2023
5c432a5
Merge pull request #12766 from github/updates
dmca-sync-bot Jan 19, 2023
7b11d39
Process DMCA request
Jan 19, 2023
d8a1a20
Merge pull request #12767 from github/updates
dmca-sync-bot Jan 19, 2023
68e51ed
Process DMCA request
Jan 19, 2023
0325ce3
Merge pull request #12768 from github/updates
dmca-sync-bot Jan 19, 2023
2d25721
Process DMCA request
Jan 19, 2023
1e59c4f
Merge pull request #12769 from github/updates
dmca-sync-bot Jan 19, 2023
bf206c8
Process DMCA request
Jan 19, 2023
829ba7d
Merge pull request #12770 from github/updates
dmca-sync-bot Jan 19, 2023
f5bbcb6
Process DMCA request
Jan 19, 2023
0bb7746
Merge pull request #12771 from github/updates
dmca-sync-bot Jan 19, 2023
a6192df
Process DMCA request
Jan 19, 2023
27b9026
Merge pull request #12772 from github/updates
dmca-sync-bot Jan 19, 2023
19b922c
Process DMCA request
Jan 19, 2023
95c3c7b
Merge pull request #12773 from github/updates
dmca-sync-bot Jan 19, 2023
eb73bb4
Process DMCA request
Jan 19, 2023
ea1ff10
Merge pull request #12774 from github/updates
dmca-sync-bot Jan 19, 2023
e8593d1
Process DMCA request
Jan 19, 2023
bcc8242
Merge pull request #12775 from github/updates
dmca-sync-bot Jan 19, 2023
4870ac7
Process DMCA request
Jan 19, 2023
7852404
Merge pull request #12776 from github/updates
dmca-sync-bot Jan 19, 2023
1ab5f6d
Process DMCA request
Jan 19, 2023
1233e41
Merge pull request #12777 from github/updates
dmca-sync-bot Jan 19, 2023
406e3a8
Process DMCA request
Jan 19, 2023
d57b30a
Merge pull request #12778 from github/updates
dmca-sync-bot Jan 19, 2023
3179926
Process DMCA request
Jan 19, 2023
2b90946
Merge pull request #12779 from github/updates
dmca-sync-bot Jan 19, 2023
f5d48bf
Process DMCA request
Jan 19, 2023
67f46df
Merge pull request #12780 from github/updates
dmca-sync-bot Jan 19, 2023
984990c
Process DMCA request
Jan 20, 2023
38b7b40
Merge pull request #12781 from github/updates
dmca-sync-bot Jan 20, 2023
aed9386
Process DMCA request
Jan 20, 2023
7022095
Merge pull request #12782 from github/updates
dmca-sync-bot Jan 20, 2023
91fd3b0
Process DMCA request
Jan 20, 2023
b1cf3e6
Merge pull request #12783 from github/updates
dmca-sync-bot Jan 20, 2023
dfada6c
Process DMCA request
Jan 25, 2023
a8cfd30
Merge pull request #12786 from github/updates
dmca-sync-bot Jan 25, 2023
0ae4c30
Process DMCA request
Jan 26, 2023
bb445d8
Merge pull request #12787 from github/updates
dmca-sync-bot Jan 26, 2023
46a41b1
Process DMCA request
Jan 26, 2023
98986e2
Merge pull request #12788 from github/updates
dmca-sync-bot Jan 26, 2023
9ec6136
Process DMCA request
Jan 27, 2023
5254037
Merge pull request #12789 from github/updates
dmca-sync-bot Jan 27, 2023
a7fdf0e
Process DMCA request
Jan 27, 2023
f27c6a5
Merge pull request #12790 from github/updates
dmca-sync-bot Jan 27, 2023
71f11fc
Process DMCA request
Jan 27, 2023
6c4b95b
Merge pull request #12791 from github/updates
dmca-sync-bot Jan 27, 2023
29450af
Process DMCA request
Jan 27, 2023
138a19d
Merge pull request #12792 from github/updates
dmca-sync-bot Jan 27, 2023
b7562c4
Process DMCA request
Jan 30, 2023
4172821
Merge pull request #12793 from github/updates
dmca-sync-bot Jan 30, 2023
dfa422a
Process DMCA request
Jan 30, 2023
08a2032
Merge pull request #12794 from github/updates
dmca-sync-bot Jan 30, 2023
a28faf8
Process DMCA request
Jan 30, 2023
cc6010b
Merge pull request #12795 from github/updates
dmca-sync-bot Jan 30, 2023
a5a9e8e
Process DMCA request
Jan 30, 2023
0e9286d
Merge pull request #12796 from github/updates
dmca-sync-bot Jan 30, 2023
5096586
Process DMCA request
Jan 30, 2023
de1fd11
Merge pull request #12797 from github/updates
dmca-sync-bot Jan 30, 2023
069f06b
Process DMCA request
Jan 30, 2023
257f947
Merge pull request #12798 from github/updates
dmca-sync-bot Jan 30, 2023
9641320
Process DMCA request
Jan 30, 2023
c1b3134
Merge pull request #12799 from github/updates
dmca-sync-bot Jan 30, 2023
d87892d
Process DMCA request
Jan 30, 2023
9de3462
Merge pull request #12800 from github/updates
dmca-sync-bot Jan 30, 2023
8e32941
Process DMCA request
Jan 30, 2023
119f7cd
Merge pull request #12801 from github/updates
dmca-sync-bot Jan 30, 2023
581bfb9
Process DMCA request
Jan 30, 2023
b3c57a5
Merge pull request #12802 from github/updates
dmca-sync-bot Jan 30, 2023
54dc352
Process DMCA request
Jan 30, 2023
15126c3
Merge pull request #12803 from github/updates
dmca-sync-bot Jan 30, 2023
7865725
Process DMCA request
Jan 31, 2023
6b9ba72
Merge pull request #12804 from github/updates
dmca-sync-bot Jan 31, 2023
e00f9c4
Process DMCA request
Jan 31, 2023
772d2ac
Merge pull request #12805 from github/updates
dmca-sync-bot Jan 31, 2023
b2a500a
Process DMCA request
Jan 31, 2023
b54104d
Merge pull request #12806 from github/updates
dmca-sync-bot Jan 31, 2023
32c8824
Process DMCA request
Jan 31, 2023
06e12b8
Merge pull request #12807 from github/updates
dmca-sync-bot Jan 31, 2023
61d1f4f
Process DMCA request
Jan 31, 2023
578adaf
Merge pull request #12808 from github/updates
dmca-sync-bot Jan 31, 2023
008e002
Process DMCA request
Jan 31, 2023
14d1ac0
Merge pull request #12809 from github/updates
dmca-sync-bot Jan 31, 2023
1aa36bd
Process DMCA request
Jan 31, 2023
a4c8615
Merge pull request #12810 from github/updates
dmca-sync-bot Jan 31, 2023
c53651b
Process DMCA request
Feb 1, 2023
808d4b9
Merge pull request #12811 from github/updates
dmca-sync-bot Feb 1, 2023
dac1a8a
Process DMCA request
Feb 1, 2023
fe7034c
Merge pull request #12812 from github/updates
dmca-sync-bot Feb 1, 2023
eff7e46
Process DMCA request
Feb 1, 2023
3d8fee8
Merge pull request #12813 from github/updates
dmca-sync-bot Feb 1, 2023
000f152
Process DMCA request
Feb 1, 2023
375c262
Merge pull request #12814 from github/updates
dmca-sync-bot Feb 1, 2023
c69ea6b
Process DMCA request
Feb 1, 2023
3ae8f29
Merge pull request #12815 from github/updates
dmca-sync-bot Feb 1, 2023
af6021e
Process DMCA request
Feb 1, 2023
b8b0dc6
Merge pull request #12816 from github/updates
dmca-sync-bot Feb 1, 2023
6cd2fcf
Process DMCA request
Feb 2, 2023
a70e6c9
Merge pull request #12817 from github/updates
dmca-sync-bot Feb 2, 2023
e7a2c0c
Process DMCA request
Feb 2, 2023
4060602
Merge pull request #12818 from github/updates
dmca-sync-bot Feb 2, 2023
cff94f6
Process DMCA request
Feb 2, 2023
2ee701a
Merge pull request #12819 from github/updates
dmca-sync-bot Feb 2, 2023
bb8db25
Process DMCA request
Feb 2, 2023
ba1681a
Merge pull request #12820 from github/updates
dmca-sync-bot Feb 2, 2023
b4c32d3
Create 2023-02-03-bluemoon-china.md
huanongkou Feb 3, 2023
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