Repository: google/clusterfuzz

Issue:
Initialize issue_body_footer when reading issue tracker config
It seems like we forgot to add initialization of `issue_body_footer` in https://github.com/google/clusterfuzz/blob/dfe686cde7429ed0ba482b0b0b4f27106b0a0d5f/src/appengine/libs/issue_management/issue_tracker_policy.py#L114, that's why the issues filed recently do not have the text explaining that OSS-Fuzz team doesn't read bug tracked comments and can be contacted via GitHub only.

Bug example: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17216


Discussion:
Assigning to Oliver as I guess it is related to the issue tracker refactoring, but feel free to bounce back :)

Resolving patch:
diff --git a/src/appengine/libs/issue_management/issue_tracker_policy.py b/src/appengine/libs/issue_management/issue_tracker_policy.py
--- a/src/appengine/libs/issue_management/issue_tracker_policy.py
+++ b/src/appengine/libs/issue_management/issue_tracker_policy.py
@@ -126,6 +126,10 @@ def _apply_new_issue_properties(self, policy, issue_type, is_crash):
     if labels:
       policy.labels.extend(_to_str_list(labels))
 
+    issue_body_footer = issue_type.get('issue_body_footer')
+    if issue_body_footer:
+      policy.issue_body_footer = issue_body_footer
+
     if is_crash:
       crash_labels = issue_type.get('crash_labels')
       if crash_labels:


Test patch:
diff --git a/src/python/tests/appengine/libs/issue_filer_test.py b/src/python/tests/appengine/libs/issue_filer_test.py
--- a/src/python/tests/appengine/libs/issue_filer_test.py
+++ b/src/python/tests/appengine/libs/issue_filer_test.py
@@ -280,6 +280,8 @@ def test_filed_issues_oss_fuzz(self):
     self.assertFalse(
         issue_tracker._itm.last_issue.has_label_matching('reported-2016-01-01'))
     self.assertNotIn(DEADLINE_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(FIX_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(QUESTIONS_NOTE, issue_tracker._itm.last_issue.body)
 
     issue_filer.file_issue(self.testcase1_security, issue_tracker)
     self.assertTrue(
@@ -288,6 +290,8 @@ def test_filed_issues_oss_fuzz(self):
     self.assertFalse(
         issue_tracker._itm.last_issue.has_label_matching('reported-2016-01-01'))
     self.assertNotIn(DEADLINE_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(FIX_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(QUESTIONS_NOTE, issue_tracker._itm.last_issue.body)
 
     issue_filer.file_issue(self.testcase2, issue_tracker)
     self.assertFalse(
@@ -296,6 +300,8 @@ def test_filed_issues_oss_fuzz(self):
     self.assertTrue(
         issue_tracker._itm.last_issue.has_label_matching('reported-2016-01-01'))
     self.assertNotIn(DEADLINE_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(FIX_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(QUESTIONS_NOTE, issue_tracker._itm.last_issue.body)
 
     issue_filer.file_issue(self.testcase2_security, issue_tracker)
     self.assertTrue(
@@ -304,6 +310,8 @@ def test_filed_issues_oss_fuzz(self):
     self.assertTrue(
         issue_tracker._itm.last_issue.has_label_matching('reported-2016-01-01'))
     self.assertIn(DEADLINE_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(FIX_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(QUESTIONS_NOTE, issue_tracker._itm.last_issue.body)
 
     issue_filer.file_issue(self.testcase3, issue_tracker)
     self.assertFalse(
@@ -312,6 +320,8 @@ def test_filed_issues_oss_fuzz(self):
     self.assertFalse(
         issue_tracker._itm.last_issue.has_label_matching('reported-2016-01-01'))
     self.assertNotIn(DEADLINE_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(FIX_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(QUESTIONS_NOTE, issue_tracker._itm.last_issue.body)
 
     issue_filer.file_issue(self.testcase3_security, issue_tracker)
     self.assertFalse(
@@ -320,6 +330,8 @@ def test_filed_issues_oss_fuzz(self):
     self.assertTrue(
         issue_tracker._itm.last_issue.has_label_matching('reported-2016-01-01'))
     self.assertNotIn(DEADLINE_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(FIX_NOTE, issue_tracker._itm.last_issue.body)
+    self.assertIn(QUESTIONS_NOTE, issue_tracker._itm.last_issue.body)
 
   def test_testcase_metadata_labels(self):
     """Tests issue filing with additional labels."""