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

Revert "Added 2023/03/2023-03-24-amasty.md" #13132

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
03bcc1c
Merge pull request #13007 from github/updates
dmca-sync-bot Feb 27, 2023
2e77677
Process DMCA request
Feb 27, 2023
5d0912c
Merge pull request #13008 from github/updates
dmca-sync-bot Feb 27, 2023
67e93b6
Process DMCA request
Feb 27, 2023
b55a5ca
Merge pull request #13009 from github/updates
dmca-sync-bot Feb 27, 2023
3245b2d
Process DMCA request
Feb 27, 2023
310988a
Merge pull request #13010 from github/updates
dmca-sync-bot Feb 27, 2023
f0b67ec
Process DMCA request
Feb 28, 2023
1f21b8f
Merge pull request #13011 from github/updates
dmca-sync-bot Feb 28, 2023
c12d3c0
Process DMCA request
Feb 28, 2023
6c5e1c8
Merge pull request #13012 from github/updates
dmca-sync-bot Feb 28, 2023
9c9718d
Process DMCA request
Feb 28, 2023
508d845
Merge pull request #13013 from github/updates
dmca-sync-bot Feb 28, 2023
d057b2b
Process DMCA request
Feb 28, 2023
08f1980
Merge pull request #13014 from github/updates
dmca-sync-bot Feb 28, 2023
60ab641
Process DMCA request
Feb 28, 2023
2e78b53
Merge pull request #13015 from github/updates
dmca-sync-bot Feb 28, 2023
f120f81
Process DMCA request
Feb 28, 2023
5f079eb
Merge pull request #13016 from github/updates
dmca-sync-bot Feb 28, 2023
cf7f0c6
Process DMCA request
Feb 28, 2023
f93f85a
Merge pull request #13017 from github/updates
dmca-sync-bot Feb 28, 2023
d05553c
Process DMCA request
Feb 28, 2023
9a24327
Merge pull request #13018 from github/updates
dmca-sync-bot Feb 28, 2023
83318a2
Process DMCA request
Feb 28, 2023
b771e85
Merge pull request #13019 from github/updates
dmca-sync-bot Feb 28, 2023
b3878aa
Process DMCA request
Mar 1, 2023
d8201a9
Merge pull request #13020 from github/updates
dmca-sync-bot Mar 1, 2023
48e448c
Process DMCA request
Mar 1, 2023
e9e7998
Merge pull request #13021 from github/updates
dmca-sync-bot Mar 1, 2023
6750349
Process DMCA request
Mar 1, 2023
5a55ce8
Merge pull request #13022 from github/updates
dmca-sync-bot Mar 1, 2023
4d903c0
Process DMCA request
Mar 1, 2023
6fb8231
Merge pull request #13023 from github/updates
dmca-sync-bot Mar 1, 2023
f10b0af
Process DMCA request
Mar 1, 2023
ca2d685
Merge pull request #13024 from github/updates
dmca-sync-bot Mar 1, 2023
178399b
Process DMCA request
Mar 1, 2023
12a61ca
Merge pull request #13025 from github/updates
dmca-sync-bot Mar 1, 2023
b4e66ea
Process DMCA request
Mar 1, 2023
3720562
Merge pull request #13026 from github/updates
dmca-sync-bot Mar 1, 2023
44b354f
Process DMCA request
Mar 2, 2023
4d05a34
Merge pull request #13027 from github/updates
dmca-sync-bot Mar 2, 2023
07a9bf5
Process DMCA request
Mar 2, 2023
0f2a4c0
Merge pull request #13028 from github/updates
dmca-sync-bot Mar 2, 2023
59026b3
Process DMCA request
Mar 2, 2023
0a49005
Merge pull request #13029 from github/updates
dmca-sync-bot Mar 2, 2023
d8173ef
Process DMCA request
Mar 3, 2023
842c963
Merge pull request #13030 from github/updates
dmca-sync-bot Mar 3, 2023
ba7386d
Process DMCA request
Mar 6, 2023
e191409
Merge pull request #13031 from github/updates
dmca-sync-bot Mar 6, 2023
181aa1c
Process DMCA request
Mar 6, 2023
92234ef
Merge pull request #13032 from github/updates
dmca-sync-bot Mar 6, 2023
cbabd6f
Process DMCA request
Mar 6, 2023
17012ff
Merge pull request #13033 from github/updates
dmca-sync-bot Mar 6, 2023
12047d1
Process DMCA request
Mar 6, 2023
34910b2
Merge pull request #13034 from github/updates
dmca-sync-bot Mar 6, 2023
84c8853
Process DMCA request
Mar 6, 2023
394c19a
Merge pull request #13035 from github/updates
dmca-sync-bot Mar 6, 2023
4b81106
Process DMCA request
Mar 6, 2023
3920688
Merge pull request #13036 from github/updates
dmca-sync-bot Mar 6, 2023
248cf25
Process DMCA request
Mar 6, 2023
ff708f3
Merge pull request #13037 from github/updates
dmca-sync-bot Mar 6, 2023
e0b9de0
Process DMCA request
Mar 7, 2023
7b8d9b5
Merge pull request #13038 from github/updates
dmca-sync-bot Mar 7, 2023
ec8086e
Process DMCA request
Mar 7, 2023
aba4f18
Merge pull request #13039 from github/updates
dmca-sync-bot Mar 7, 2023
af9a471
Process DMCA request
Mar 7, 2023
de6e9e4
Merge pull request #13040 from github/updates
dmca-sync-bot Mar 7, 2023
0c5f233
Process DMCA request
Mar 7, 2023
7f0ef48
Merge pull request #13041 from github/updates
dmca-sync-bot Mar 7, 2023
aabf890
Process DMCA request
Mar 7, 2023
6f95f9c
Merge pull request #13042 from github/updates
dmca-sync-bot Mar 7, 2023
55a212c
Process DMCA request
Mar 7, 2023
14cfead
Merge pull request #13043 from github/updates
dmca-sync-bot Mar 7, 2023
645b08b
Process DMCA request
Mar 8, 2023
8dedfd4
Merge pull request #13044 from github/updates
dmca-sync-bot Mar 8, 2023
ebfe8d1
Process DMCA request
Mar 8, 2023
8260d0e
Merge pull request #13045 from github/updates
dmca-sync-bot Mar 8, 2023
187117d
Process DMCA request
Mar 8, 2023
fa3c6ed
Merge pull request #13046 from github/updates
dmca-sync-bot Mar 8, 2023
363bd54
Process DMCA request
Mar 8, 2023
706120b
Merge pull request #13047 from github/updates
dmca-sync-bot Mar 8, 2023
1dfe9b4
Process DMCA request
Mar 8, 2023
1fc84a2
Merge pull request #13048 from github/updates
dmca-sync-bot Mar 8, 2023
a668499
Process DMCA request
Mar 8, 2023
16997d4
Merge pull request #13049 from github/updates
dmca-sync-bot Mar 8, 2023
a191d10
Process DMCA request
Mar 8, 2023
b5314f9
Merge pull request #13050 from github/updates
dmca-sync-bot Mar 8, 2023
9f6cf61
Process DMCA request
Mar 8, 2023
1c886e7
Merge pull request #13051 from github/updates
dmca-sync-bot Mar 8, 2023
b005312
Process DMCA request
Mar 8, 2023
eca7d6f
Merge pull request #13052 from github/updates
dmca-sync-bot Mar 8, 2023
c65e8c4
Process DMCA request
Mar 9, 2023
d2d0c1b
Merge pull request #13053 from github/updates
dmca-sync-bot Mar 9, 2023
0f23db7
Process DMCA request
Mar 9, 2023
92a6950
Merge pull request #13054 from github/updates
dmca-sync-bot Mar 9, 2023
17d4187
Process DMCA request
Mar 9, 2023
4e66e8b
Merge pull request #13055 from github/updates
dmca-sync-bot Mar 9, 2023
ee8459b
Process DMCA request
Mar 9, 2023
c8a8b66
Merge pull request #13056 from github/updates
dmca-sync-bot Mar 9, 2023
4ed553b
Process DMCA request
Mar 9, 2023
9b78931
Merge pull request #13057 from github/updates
dmca-sync-bot Mar 9, 2023
3131d5b
Process DMCA request
Mar 9, 2023
078546c
Merge pull request #13058 from github/updates
dmca-sync-bot Mar 9, 2023
73d4bf9
Process DMCA request
Mar 9, 2023
695f723
Merge pull request #13059 from github/updates
dmca-sync-bot Mar 9, 2023
eb33b6f
Process DMCA request
Mar 9, 2023
b392af9
Merge pull request #13060 from github/updates
dmca-sync-bot Mar 9, 2023
855fd72
Process DMCA request
Mar 9, 2023
0221431
Merge pull request #13061 from github/updates
dmca-sync-bot Mar 9, 2023
b84ae36
Process DMCA request
Mar 9, 2023
2bdfe0a
Merge pull request #13062 from github/updates
dmca-sync-bot Mar 9, 2023
3447ff4
Process DMCA request
Mar 9, 2023
f249082
Merge pull request #13063 from github/updates
dmca-sync-bot Mar 9, 2023
52c2eb5
Process DMCA request
Mar 10, 2023
502187d
Merge pull request #13064 from github/updates
dmca-sync-bot Mar 10, 2023
31eebf5
Process DMCA request
Mar 10, 2023
1d3778e
Merge pull request #13065 from github/updates
dmca-sync-bot Mar 10, 2023
0da7221
Process DMCA request
Mar 10, 2023
b6feceb
Merge pull request #13066 from github/updates
dmca-sync-bot Mar 10, 2023
e05198f
Process DMCA request
Mar 13, 2023
d5e9b29
Merge pull request #13067 from github/updates
dmca-sync-bot Mar 13, 2023
c53695c
Process DMCA request
Mar 13, 2023
747b1e7
Merge pull request #13068 from github/updates
dmca-sync-bot Mar 13, 2023
5cc4e52
Process DMCA request
Mar 13, 2023
4bc76a8
Merge pull request #13069 from github/updates
dmca-sync-bot Mar 13, 2023
81f9282
Process DMCA request
Mar 13, 2023
05b0e1f
Merge pull request #13070 from github/updates
dmca-sync-bot Mar 13, 2023
d79d565
Process DMCA request
Mar 13, 2023
76af877
Merge pull request #13071 from github/updates
dmca-sync-bot Mar 13, 2023
6e0010c
Process DMCA request
Mar 13, 2023
d610295
Merge pull request #13072 from github/updates
dmca-sync-bot Mar 13, 2023
462934e
Process DMCA request
Mar 13, 2023
b2511d1
Merge pull request #13073 from github/updates
dmca-sync-bot Mar 13, 2023
b842f8f
Process DMCA request
Mar 14, 2023
daf34ec
Merge pull request #13074 from github/updates
dmca-sync-bot Mar 14, 2023
0c8d582
Process DMCA request
Mar 14, 2023
1b9bd55
Merge pull request #13075 from github/updates
dmca-sync-bot Mar 14, 2023
7977931
Process DMCA request
Mar 14, 2023
a8e7981
Merge pull request #13076 from github/updates
dmca-sync-bot Mar 14, 2023
3cac0f1
Process DMCA request
Mar 14, 2023
848510b
Merge pull request #13077 from github/updates
dmca-sync-bot Mar 14, 2023
f8fe642
Process DMCA request
Mar 14, 2023
8dd7e9a
Merge pull request #13078 from github/updates
dmca-sync-bot Mar 14, 2023
dd16c3e
Process DMCA request
Mar 14, 2023
33d49b3
Merge pull request #13079 from github/updates
dmca-sync-bot Mar 14, 2023
242aa58
Process DMCA request
Mar 14, 2023
88919c3
Merge pull request #13080 from github/updates
dmca-sync-bot Mar 14, 2023
e8309fc
Process DMCA request
Mar 14, 2023
5f8395c
Merge pull request #13081 from github/updates
dmca-sync-bot Mar 14, 2023
b70a395
Process DMCA request
Mar 14, 2023
bae50e0
Merge pull request #13082 from github/updates
dmca-sync-bot Mar 14, 2023
626e267
Process DMCA request
Mar 14, 2023
530d54d
Merge pull request #13083 from github/updates
dmca-sync-bot Mar 14, 2023
85ed894
Process DMCA request
Mar 14, 2023
d1e5c4f
Merge pull request #13084 from github/updates
dmca-sync-bot Mar 14, 2023
7e7fc2e
Process DMCA request
Mar 14, 2023
719da47
Merge pull request #13085 from github/updates
dmca-sync-bot Mar 14, 2023
61ffdfe
Process DMCA request
Mar 15, 2023
8721001
Merge pull request #13086 from github/updates
dmca-sync-bot Mar 15, 2023
fa0b285
Process DMCA request
Mar 15, 2023
823a959
Merge pull request #13087 from github/updates
dmca-sync-bot Mar 15, 2023
be70367
Process DMCA request
Mar 15, 2023
1612d7f
Merge pull request #13088 from github/updates
dmca-sync-bot Mar 15, 2023
6421c31
Process DMCA request
Mar 15, 2023
91710bb
Merge pull request #13089 from github/updates
dmca-sync-bot Mar 15, 2023
627fd7b
Process DMCA request
Mar 15, 2023
08dab5b
Merge pull request #13090 from github/updates
dmca-sync-bot Mar 15, 2023
041d883
Process DMCA request
Mar 16, 2023
c8da34d
Merge pull request #13091 from github/updates
dmca-sync-bot Mar 16, 2023
8fd4ded
Process DMCA request
Mar 16, 2023
60169d8
Merge pull request #13092 from github/updates
dmca-sync-bot Mar 16, 2023
1235c80
Process DMCA request
Mar 17, 2023
cb344af
Merge pull request #13093 from github/updates
dmca-sync-bot Mar 17, 2023
a7686e1
Process DMCA request
Mar 17, 2023
638b2f6
Merge pull request #13094 from github/updates
dmca-sync-bot Mar 17, 2023
8aede0e
Process DMCA request
Mar 17, 2023
dddba69
Merge pull request #13095 from github/updates
dmca-sync-bot Mar 17, 2023
fb09dbc
Process DMCA request
Mar 17, 2023
57955ca
Merge pull request #13096 from github/updates
dmca-sync-bot Mar 17, 2023
22e45b5
Process DMCA request
Mar 21, 2023
03a88c3
Merge pull request #13097 from github/updates
dmca-sync-bot Mar 21, 2023
b0b79b7
Process DMCA request
Mar 21, 2023
69ab613
Merge pull request #13098 from github/updates
dmca-sync-bot Mar 21, 2023
e0cb617
Process DMCA request
Mar 21, 2023
050b17f
Merge pull request #13099 from github/updates
dmca-sync-bot Mar 21, 2023
8423516
Process DMCA request
Mar 21, 2023
07c2f49
Merge pull request #13100 from github/updates
dmca-sync-bot Mar 21, 2023
ae55a42
Process DMCA request
Mar 21, 2023
a8caebd
Merge pull request #13101 from github/updates
dmca-sync-bot Mar 21, 2023
5076325
Process DMCA request
Mar 21, 2023
da5d9b1
Merge pull request #13102 from github/updates
dmca-sync-bot Mar 21, 2023
afb447c
Process DMCA request
Mar 21, 2023
8441f2d
Merge pull request #13103 from github/updates
dmca-sync-bot Mar 21, 2023
56fb893
Process DMCA request
Mar 21, 2023
bc40e6e
Merge pull request #13104 from github/updates
dmca-sync-bot Mar 21, 2023
c4add4a
Process DMCA request
Mar 21, 2023
06ce968
Merge pull request #13105 from github/updates
dmca-sync-bot Mar 21, 2023
b3d4809
Process DMCA request
Mar 21, 2023
bce182f
Merge pull request #13106 from github/updates
dmca-sync-bot Mar 21, 2023
4876f5c
Process DMCA request
Mar 21, 2023
6ba1f06
Merge pull request #13107 from github/updates
dmca-sync-bot Mar 21, 2023
5e83f20
Process DMCA request
Mar 22, 2023
031c22d
Merge pull request #13108 from github/updates
dmca-sync-bot Mar 22, 2023
41fab05
Process DMCA request
Mar 22, 2023
0f5027b
Merge pull request #13109 from github/updates
dmca-sync-bot Mar 22, 2023
d706c43
Process DMCA request
Mar 22, 2023
905e86d
Merge pull request #13110 from github/updates
dmca-sync-bot Mar 22, 2023
54ce612
Process DMCA request
Mar 22, 2023
3a9c194
Merge pull request #13111 from github/updates
dmca-sync-bot Mar 22, 2023
81ff74e
Process DMCA request
Mar 22, 2023
18f8161
Merge pull request #13112 from github/updates
dmca-sync-bot Mar 22, 2023
ea49a7d
Process DMCA request
Mar 22, 2023
9661d5c
Merge pull request #13113 from github/updates
dmca-sync-bot Mar 22, 2023
ba198df
Process DMCA request
Mar 22, 2023
022ac5c
Merge pull request #13114 from github/updates
dmca-sync-bot Mar 22, 2023
12a8c39
Process DMCA request
Mar 23, 2023
94d4125
Merge pull request #13115 from github/updates
dmca-sync-bot Mar 23, 2023
a08298e
Process DMCA request
Mar 23, 2023
321ad96
Merge pull request #13116 from github/updates
dmca-sync-bot Mar 23, 2023
03dcb77
Process DMCA request
Mar 23, 2023
a6894ab
Merge pull request #13117 from github/updates
dmca-sync-bot Mar 23, 2023
cdb875e
Process DMCA request
Mar 23, 2023
325a3be
Merge pull request #13118 from github/updates
dmca-sync-bot Mar 23, 2023
3e5fba5
Process DMCA request
Mar 23, 2023
fd85aa7
Merge pull request #13119 from github/updates
dmca-sync-bot Mar 23, 2023
d3102e2
Process DMCA request
Mar 23, 2023
39c7fb2
Merge pull request #13120 from github/updates
dmca-sync-bot Mar 23, 2023
0a84e4f
Process DMCA request
Mar 23, 2023
2357f88
Merge pull request #13121 from github/updates
dmca-sync-bot Mar 23, 2023
aa3195a
Process DMCA request
Mar 24, 2023
a92ec8c
Merge pull request #13122 from github/updates
dmca-sync-bot Mar 24, 2023
de11907
Process DMCA request
Mar 24, 2023
330f659
Merge pull request #13123 from github/updates
dmca-sync-bot Mar 24, 2023
e0547f5
Process DMCA request
Mar 24, 2023
7becd84
Merge pull request #13124 from github/updates
dmca-sync-bot Mar 24, 2023
5d111bf
Process DMCA request
Mar 24, 2023
5120788
Merge pull request #13125 from github/updates
dmca-sync-bot Mar 24, 2023
5140012
Process DMCA request
Mar 24, 2023
2c6665f
Merge pull request #13126 from github/updates
dmca-sync-bot Mar 24, 2023
49827fc
Process DMCA request
Mar 24, 2023
3a47eee
Merge pull request #13127 from github/updates
dmca-sync-bot Mar 24, 2023
ade9574
Process DMCA request
Mar 27, 2023
0b5ba0c
Merge pull request #13128 from github/updates
dmca-sync-bot Mar 27, 2023
1692329
Process DMCA request
Mar 27, 2023
8101696
Merge pull request #13129 from github/updates
dmca-sync-bot Mar 27, 2023
ba777bf
Process DMCA request
Mar 27, 2023
a8eddac
Merge pull request #13130 from github/updates
dmca-sync-bot Mar 27, 2023
feeb048
Process DMCA request
Mar 27, 2023
f735d6f
Merge pull request #13131 from github/updates
dmca-sync-bot Mar 27, 2023
2bb927e
Revert "Added 2023/03/2023-03-24-amasty.md"
Rozikaputra Mar 28, 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