Skip to content

Commit

Permalink
Use main instead of master when collecting PR descriptions
Browse files Browse the repository at this point in the history
Also drop "base=master" from the GET request that is sent to GitHub api
to collect merged PRs, this shouldn't anyway.
  • Loading branch information
onurctirtir committed Sep 15, 2022
1 parent 1bdd130 commit 8447bbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion automated_packaging/common_functions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions automated_packaging/prepare_changelog.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`;

0 comments on commit 8447bbf

Please sign in to comment.