Skip to content

Commit 529f893

Browse files
Improve Github automation (#7452)
* fix: Fix PR description message * feat: Add support for patch release * chore: Update documentation
1 parent 1a4f8ac commit 529f893

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ _Action:_ Run GitHub CodeQL action, upload result to GitHub security tab and Dat
9898

9999
_Trigger:_ Every week or manually.
100100

101-
_Action:_ Update the Grade dependencies and their locking files.
101+
_Action:_ Create a PR updating the Grade dependencies and their locking files.
102102

103103
_Recovery:_ Manually trigger the action again.
104104

.github/workflows/add-milestone-to-pull-requests.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ jobs:
5757
return a.version.patch - b.version.patch
5858
})
5959
.pop()?.number
60-
} else if (base.startsWith('release/v')) {
61-
// Pick the milestone with the same title as the base branch
62-
const version = base.substring(9)
60+
} else if (base.startsWith('release/v') && base.endsWith('.x')) {
61+
// Extract the minor version related to the base branch (e.g. "release/v1.2.x" -> "1.2.")
62+
const version = base.substring(9, base.length - 1)
63+
// Pick the milestone with title matching the extracted version
6364
const versionMilestone = response.data
64-
.find(milestone => milestone.title == version)
65+
.find(milestone => milestone.title.startsWith(version))
6566
if (!versionMilestone) {
66-
core.setFailed(`Version milestone not found: ${version}`)
67+
core.setFailed(`Milestone not found for minor version: ${version}`)
6768
} else {
6869
milestoneNumber = versionMilestone.number
6970
}

.github/workflows/update-gradle-dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
GH_TOKEN: ${{ github.token }}
7171
run: |
7272
gh pr create --title "Update Gradle dependencies" \
73-
--body "This PR updates the Gradle dependencies. \n:warning: Don't forget to squash commits before merging :warning:" \
73+
--body "This PR updates the Gradle dependencies. ⚠️ Don't forget to squash commits before merging. ⚠️" \
7474
--base master \
7575
--head $BRANCH_NAME \
7676
--label "tag: dependencies" \

0 commit comments

Comments
 (0)