intel_sync_upstream.sh: Add hooks to pass BUG-ID as 4th argument

This patch adds yet another parameter to specify the BUG-ID which
can be use to build the justification while pushing changes into
the intermediate staging branch.

w/o this patch:

 > ./intel_sync_upstream.sh mtl fsp MTL.3471.91
 Outcome: unable to push the FSP uprev patch

w/ this patch:

 > ./intel_sync_upstream.sh mtl fsp MTL.3471.91 327688959
 Outcome: able to use bug-id to build the justification using
 `git push <remote> <branch> --push-justification=b/"$4"`

BUG=b:328608061
TEST=Able to push FSP uprev CL.

Change-Id: Id8806c0986e9e0d3cbe52d2bbc90c3ac261b6d94
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/5354168
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: Subrata Banik <subratabanik@chromium.org>
Tested-by: Subrata Banik <subratabanik@chromium.org>
Reviewed-by: Shou-Chieh Hsu <shouchieh@chromium.org>
diff --git a/contrib/firmware/intel_sync_upstream.sh b/contrib/firmware/intel_sync_upstream.sh
index 04b8cdf..3e9b631 100755
--- a/contrib/firmware/intel_sync_upstream.sh
+++ b/contrib/firmware/intel_sync_upstream.sh
@@ -29,13 +29,13 @@
 function usage()
 {
   echo "Error: missing parameter."
-  echo "Usage: $0 SOC [fsp|edk2|edk2-platforms|coreboot] version_string"
-  echo "Example: $0 tgl fsp 'TGL.2527_17'"
+  echo "Usage: $0 SOC [fsp|edk2|edk2-platforms|coreboot] version_string bug_id"
+  echo "Example: $0 tgl fsp 'TGL.2527_17' 123456"
   exit 1
 }
 
 # Verify param count
-if [ "$#" -ne "3" ]; then
+if [ "$#" -ne "4" ]; then
   usage
 fi;
 SOC="$1"
@@ -133,7 +133,7 @@
 echo "Checked out upstream/${VERSION} to branch ${STAGING_NAME}-${VERSION}"
 
 echo "Pushing to a staging repo to avoid 'forge commiter' permission issues"
-git push -o skip-validation -o nokeycheck cros-internal HEAD:refs/heads/staging/"${STAGING_PREFIX}"-"${VERSION}"
+git push -o skip-validation -o nokeycheck -o push-justification=b/"$4" cros-internal HEAD:refs/heads/staging/"${STAGING_PREFIX}"-"${VERSION}"
 die $? "Could not push to a staging repo"
 
 # Checkout a local branch from remotes/cros-internal/${CHROMEOS_BRANCH}