Skip to content

Commit 243127a

Browse files
committed
clean up logic
1 parent aeaf864 commit 243127a

File tree

4 files changed

+29
-19
lines changed

4 files changed

+29
-19
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ concurrency:
88
group: ${{ github.workflow }}-${{ github.ref }}
99
cancel-in-progress: true
1010

11-
concurrency:
12-
group: ${{ github.workflow }}-${{ github.ref }}
13-
cancel-in-progress: true
14-
1511
jobs:
1612
test:
1713
runs-on: ubuntu-24.04

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
# The branches below must be a subset of the branches above
2323
branches: ['main', 'user_model/main']
2424
schedule:
25-
- cron: "37 19 * * 4"
25+
- cron: '37 19 * * 4'
2626

2727
jobs:
2828
analyze:

.github/workflows/create-release-pr.yml

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
name: Create Release PR
22

33
on:
4+
# For making a release pr from android / ios sdk actions
45
workflow_call:
56
inputs:
67
cordova_version:
7-
description: "New Cordova Version (e.g., 5.2.15 or 5.2.15-beta.1)"
8+
description: 'New Cordova Version (e.g., 5.2.15 or 5.2.15-beta.1)'
89
required: true
910
type: string
1011
android_version:
11-
description: "New Android SDK Version (e.g., 2.3.0). Leave blank to skip."
12+
description: 'New Android SDK Version (e.g., 2.3.0). Leave blank to skip.'
1213
required: false
1314
type: string
1415
ios_version:
15-
description: "New iOS SDK Version (e.g., 1.5.0). Leave blank to skip."
16+
description: 'New iOS SDK Version (e.g., 1.5.0). Leave blank to skip.'
1617
required: false
1718
type: string
1819

20+
# For making a release pr from cordova github actions
1921
workflow_dispatch:
2022
inputs:
2123
cordova_version:
22-
description: "New Cordova Version (e.g., 5.2.15 or 5.2.15-beta.1)"
24+
description: 'New Cordova Version (e.g., 5.2.15 or 5.2.15-beta.1)'
2325
required: true
2426
type: string
2527
android_version:
26-
description: "New Android SDK Version (e.g., 2.3.0). Leave blank to skip."
28+
description: 'New Android SDK Version (e.g., 2.3.0). Leave blank to skip.'
2729
required: false
2830
type: string
2931
ios_version:
30-
description: "New iOS SDK Version (e.g., 1.5.0). Leave blank to skip."
32+
description: 'New iOS SDK Version (e.g., 1.5.0). Leave blank to skip.'
3133
required: false
3234
type: string
3335

@@ -57,12 +59,19 @@ jobs:
5759
LAST_RELEASE_DATE=$(git show -s --format=%cI "$CURRENT_VERSION")
5860
echo "date=$LAST_RELEASE_DATE" >> $GITHUB_OUTPUT
5961
62+
- name: Release branch name
63+
id: release_branch
64+
run: |
65+
BRANCH_VERSION=$(echo "${{ inputs.cordova_version }}" | sed 's/\(-[a-z]*\)\.[0-9]*$/\1/')
66+
echo "releaseBranch=rel/$BRANCH_VERSION" >> $GITHUB_OUTPUT
67+
6068
- name: Get merged PRs since last release
6169
id: get_prs
6270
uses: actions/github-script@v8
6371
with:
6472
script: |
6573
const lastReleaseDate = '${{ steps.last_commit.outputs.date }}';
74+
const releaseBranch = '${{ steps.release_branch.outputs.releaseBranch }}';
6675
6776
// Get merged PRs
6877
const { data: prs } = await github.rest.pulls.list({
@@ -72,23 +81,28 @@ jobs:
7281
base: 'main',
7382
per_page: 100
7483
});
84+
const { data: relPrs } = await github.rest.pulls.list({
85+
owner: context.repo.owner,
86+
repo: context.repo.repo,
87+
state: 'closed',
88+
base: releaseBranch,
89+
per_page: 100
90+
});
7591
7692
// Filter and process PRs
77-
const mergedPrs = prs
93+
const mergedPrs = [...prs, ...relPrs]
7894
.filter(pr => pr.merged_at && new Date(pr.merged_at) > new Date(lastReleaseDate))
7995
.map(pr => ({
8096
number: pr.number,
8197
title: pr.title,
8298
}));
8399
core.setOutput('prs', JSON.stringify(mergedPrs));
84100
85-
const hasFeatures = mergedPrs.some(pr => /^feat/i.test(pr.title));
86-
core.setOutput('isFeature', hasFeatures);
87-
88101
- name: Create release branch
89102
run: |
90-
git checkout -b rel/${{ inputs.cordova_version }}
91-
git push -u origin rel/${{ inputs.cordova_version }}
103+
releaseBranch="${{ steps.release_branch.outputs.releaseBranch }}"
104+
git checkout -b "$releaseBranch"
105+
git push -u origin "$releaseBranch"
92106
93107
- name: Capture current native SDK versions
94108
id: current_versions
@@ -273,7 +287,7 @@ jobs:
273287
if [[ "$RELEASE_TYPE" == "Current" ]]; then
274288
BASE_BRANCH="main"
275289
else
276-
BASE_BRANCH="rel/$NEW_VERSION"
290+
BASE_BRANCH="${{ steps.release_branch.outputs.releaseBranch }}"
277291
fi
278292
279293
# Write release notes to file to avoid shell interpretation

.github/workflows/lint-pr-title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13-
lint:
13+
lint-pr-title:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: amannn/action-semantic-pull-request@v6

0 commit comments

Comments
 (0)