Get initial package version earlier in version.rb (#12535)

* Get initial package version earlier in version.rb

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust PR Generator workflow title.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Handle source hashes for checking for GitHub sources.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* lint workflow

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Co-authored-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
chromebrew-actions[bot]
2025-08-17 17:37:16 -05:00
committed by GitHub
parent cec62f528a
commit e8912388ae
2 changed files with 17 additions and 7 deletions

View File

@@ -434,11 +434,17 @@ jobs:
cat /tmp/pr.txt
[[ $DRAFT_PR == 'true' ]] && export PR_DRAFT_FLAG='-d'
PR_NUMBER=$(gh pr list -L 1 -s open -H ${{ inputs.branch || github.ref_name }} | cut -f1)
echo "PR title is: $(echo "${{ inputs.pr_title || inputs.branch || github.ref_name }}" | sed -e "s/^'//" -e "s/'$//") ${PKG_DELTAS}"
if [[ -z ${PR_NUMBER} ]]; then
PR_NUMBER=$(gh pr create ${PR_DRAFT_FLAG} --reviewer chromebrew/active --title "$(echo "${{ inputs.pr_title || inputs.branch || github.ref_name }}" | sed -e "s/^'//" -e "s/'$//") ${PKG_DELTAS}" -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)
PR_TITLE_INPUT="${{ inputs.pr_title }}"
if [[ -z ${PR_TITLE_INPUT} ]]; then
PR_TITLE="$(git log --oneline master..${{ inputs.branch || github.ref_name }} | grep -v "Build Run on\|Package File Update Run on" | tail -n 1 | cut -c 11-)"
else
gh pr edit --add-reviewer chromebrew/active --title "$(echo "${{ inputs.pr_title || inputs.branch || github.ref_name }}" | sed -e "s/^'//" -e "s/'$//") ${PKG_DELTAS}" -F /tmp/pr.txt
PR_TITLE="${{ inputs.pr_title }}"
fi
echo "PR title is: $(echo "${PR_TITLE}" | sed -e "s/^'//" -e "s/'$//") ${PKG_DELTAS}"
if [[ -z ${PR_NUMBER} ]]; then
PR_NUMBER=$(gh pr create ${PR_DRAFT_FLAG} --reviewer chromebrew/active --title "$(echo "${PR_TITLE}" | sed -e "s/^'//" -e "s/'$//") ${PKG_DELTAS}" -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)
else
gh pr edit --add-reviewer chromebrew/active --title "$(echo "${PR_TITLE}" | sed -e "s/^'//" -e "s/'$//") ${PKG_DELTAS}" -F /tmp/pr.txt
fi
# Draft PRs can not be set to automerge.
if [[ $DRAFT_PR == 'true' ]]; then