Allow changes in the .gitignore for new third_party inclusions

Otherwise the upload fails as it would include a change in both a `third_party` directory as well as the `.gitignore`.

Bug:1011811
Change-Id: Ifeee519cb0a1f76d1d5abb24a0297d43c0f6864a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1924202
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index b6e8602..e479e68 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -60,6 +60,9 @@
         num_in_dir = len(affected_in_dir)
         if num_in_dir == 0:
             continue
+        # Addition of new third_party folders must have a new entry in `.gitignore`
+        if '.gitignore' in affected_files:
+            num_in_dir = num_in_dir + 1
         if num_in_dir < num_affected:
             return [
                 output_api.PresubmitError(