From 8447bbfe7fd39141d7bf7f13cb2a7fab4bade4a8 Mon Sep 17 00:00:00 2001 From: Onur Tirtir Date: Thu, 15 Sep 2022 12:35:14 +0300 Subject: [PATCH] Use main instead of master when collecting PR descriptions Also drop "base=master" from the GET request that is sent to GitHub api to collect merged PRs, this shouldn't anyway. --- automated_packaging/common_functions.pm | 2 +- automated_packaging/prepare_changelog.pl | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/automated_packaging/common_functions.pm b/automated_packaging/common_functions.pm index 0c96e0d7..3ad86985 100644 --- a/automated_packaging/common_functions.pm +++ b/automated_packaging/common_functions.pm @@ -65,7 +65,7 @@ sub get_sorted_prs { my $page_number = 1; $merged_date = "2100-12-12"; do { - my $prs_text = `curl -H "Accept: application/vnd.github.v3.full+json" -X GET --user "$github_token:x-oauth-basic" 'https://api.github.com/repos/citusdata/$repo_name/pulls?base=master&state=all&page=$page_number' 2> /dev/null`; + my $prs_text = `curl -H "Accept: application/vnd.github.v3.full+json" -X GET --user "$github_token:x-oauth-basic" 'https://api.github.com/repos/citusdata/$repo_name/pulls?state=all&page=$page_number' 2> /dev/null`; my @prs = @{decode_json($prs_text)}; foreach my $pr (@prs) { diff --git a/automated_packaging/prepare_changelog.pl b/automated_packaging/prepare_changelog.pl index 2ba51311..45dc59ca 100644 --- a/automated_packaging/prepare_changelog.pl +++ b/automated_packaging/prepare_changelog.pl @@ -25,10 +25,10 @@ () $github_token = get_and_verify_token(); -# Checkout the master branch -`git checkout master`; +# Checkout the main branch +`git checkout main`; -# Now create a new branch based on master +# Now create a new branch based on main `git checkout -b $PROJECT-$NEW_VERSION-changelog-$curTime`; # Read the current changelog @@ -49,4 +49,4 @@ () # Commit and push the changes, then open a PR `git commit -a -m "Add changelog entry for $NEW_VERSION"`; `git push origin $PROJECT-$NEW_VERSION-changelog-$curTime`; -`curl -g -H "Accept: application/vnd.github.v3.full+json" -X POST --user "$github_token:x-oauth-basic" -d '{\"title\":\"Bump $PROJECT to $NEW_VERSION\", \"base\":\"master\", \"head\":\"$PROJECT-$NEW_VERSION-changelog-$curTime\"}' https://api.github.com/repos/citusdata/$PROJECT/pulls`; +`curl -g -H "Accept: application/vnd.github.v3.full+json" -X POST --user "$github_token:x-oauth-basic" -d '{\"title\":\"Bump $PROJECT to $NEW_VERSION\", \"base\":\"main\", \"head\":\"$PROJECT-$NEW_VERSION-changelog-$curTime\"}' https://api.github.com/repos/citusdata/$PROJECT/pulls`;