summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2022-12-30 21:23:13 +0000
committerDaniil Baturin <daniil@baturin.org>2022-12-30 21:25:07 +0000
commit182adaf56a5573d32d79d3c21e24007f5c18fb2b (patch)
treed8fa2c828ebb6ebb9320789b77c105bb01c40af9
parente5a5684eb4004772439b2dc33ec21b7546db3fe1 (diff)
downloadvyos-1x-182adaf56a5573d32d79d3c21e24007f5c18fb2b.tar.gz
vyos-1x-182adaf56a5573d32d79d3c21e24007f5c18fb2b.zip
ci: T4748: add a small delay to the PR title check to ensure that it gets a complete, finalized PR object from GitHub
-rwxr-xr-xscripts/check-pr-title-and-commit-messages.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/check-pr-title-and-commit-messages.py b/scripts/check-pr-title-and-commit-messages.py
index 07540b22c..1d4a3cfe3 100755
--- a/scripts/check-pr-title-and-commit-messages.py
+++ b/scripts/check-pr-title-and-commit-messages.py
@@ -2,6 +2,7 @@
import re
import sys
+import time
import requests
from pprint import pprint
@@ -27,6 +28,13 @@ if __name__ == '__main__':
print("Please specify pull request URL!")
sys.exit(1)
+ # There seems to be a race condition that causes this scripts to receive
+ # an incomplete PR object that is missing certain fields,
+ # which causes temporary CI failures that require re-running the script
+ #
+ # It's probably better to add a small delay to prevent that
+ time.sleep(5)
+
# Get the pull request object
pr = requests.get(sys.argv[1]).json()
if "title" not in pr: