Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/test-spring-boot-rc-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ jobs:
cd azure-sdk-for-java
git config --global user.email github-actions@github.com
git config --global user.name github-actions
git rm ./sdk/spring/scripts/spring_boot_${{ env.last_spring_boot_version }}_managed_external_dependencies.txt
git add -A
git commit -m "Upgrade external dependencies to align with Spring Boot ${{ env.spring_boot_version }}"
sed -i "s/NONE_SUPPORTED_SPRING_CLOUD_VERSION/${spring_cloud_version}/g" ../spring-cloud-azure-supported-spring.json
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/update-spring-cloud-azure-support-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,26 @@ jobs:
PULL_REQUEST_FROM_BRANCH: "${{ secrets.USER }}:${{ env.BRANCH_NAME }}"
PULL_REQUEST_BRANCH: "main"
PULL_REQUEST_BODY: "${{ env.PULL_REQUEST_BODY }}"
- name: Comment on Pull Requests
if: ${{ env.NEED_UPDATE_FILE == 'true' }}
uses: actions/github-script@v7
with:
github-token: ${{ secrets.ACCESS_TOKEN }}
script: |
const prTitle = process.env.PR_TITLE;
const { data: pullRequests } = await github.rest.pulls.list({
owner: 'Azure',
repo: 'azure-sdk-for-java',
state: 'open'
});

const latestPR = pullRequests.filter(pr => pr.title === prTitle);
const comment1 = `/azp run java - spring - tests`;

console.log(`Commenting on latest PR #${latestPR.number}`);
await github.rest.issues.createComment({
owner: 'Azure',
repo: 'azure-sdk-for-java',
issue_number: latestPR.number,
body: comment1
});
16 changes: 13 additions & 3 deletions .github/workflows/update-spring-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
PULL_REQUEST_BRANCH: "main"
PULL_REQUEST_BODY: "Updates external dependencies to align with Spring Boot version [${{ env.spring_boot_version }}](https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/${{ env.spring_boot_version }}/spring-boot-dependencies-${{ env.spring_boot_version }}.pom) from [${{ env.last_spring_boot_version }}](https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/${{ env.last_spring_boot_version }}/spring-boot-dependencies-${{ env.last_spring_boot_version }}.pom) and Spring Cloud version [${{ env.spring_cloud_version }}](https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-dependencies/${{ env.spring_cloud_version }}/spring-cloud-dependencies-${{ env.spring_cloud_version }}.pom) from [${{ env.last_spring_cloud_version }}](https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-dependencies/${{ env.last_spring_cloud_version }}/spring-cloud-dependencies-${{ env.last_spring_cloud_version }}.pom).\n${{ env.pr_descriptions }}\n\nThis PR is created by GitHub Actions: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
PULL_REQUEST_DRAFT: false
- name: Comment on Old Pull Requests
- name: Comment on Pull Requests
if: ${{ env.need_update_version == 'true' }}
uses: actions/github-script@v7
with:
Expand All @@ -117,14 +117,24 @@ jobs:
}

const latestPR = matchingPRs[0];
const comment = `A newer update PR has been created: #${latestPR.number} (${latestPR.html_url}). Please track updates there.`;
const comment1 = `/azp run java - spring - tests`;

console.log(`Commenting on latest PR #${latestPR.number}`);
await github.rest.issues.createComment({
owner: 'Azure',
repo: 'azure-sdk-for-java',
issue_number: latestPR.number,
body: comment1
});

const comment2 = `A newer update PR has been created: #${latestPR.number} (${latestPR.html_url}). Please track updates there.`;

for (const pr of matchingPRs.slice(1)) {
console.log(`Commenting on old PR #${pr.number}`);
await github.rest.issues.createComment({
owner: 'Azure',
repo: 'azure-sdk-for-java',
issue_number: pr.number,
body: comment
body: comment2
});
}
Loading