Skip to content

Commit 4137a9a

Browse files
committed
release 2.7.9
1 parent 453544e commit 4137a9a

File tree

5 files changed

+134
-9
lines changed

5 files changed

+134
-9
lines changed

.github/workflows/pr-release.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: 'Update Release PR'
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
update-pr:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
ref: ${{ github.event.pull_request.head.ref }}
16+
17+
- name: Check if branch is release branch and add label if needed
18+
uses: actions/github-script@v7
19+
id: check_branch
20+
with:
21+
github-token: ${{ secrets.GITHUB_TOKEN }}
22+
script: |
23+
const { issue: { number: issueNumber }, repo: { owner, repo } } = context;
24+
const branchName = '${{ github.event.pull_request.head.ref }}';
25+
26+
console.log(`Branch name: ${branchName}`);
27+
28+
// Check if branch follows 'release/xxx' pattern
29+
const isReleaseBranch = branchName.startsWith('release/');
30+
31+
if (isReleaseBranch) {
32+
console.log('This is a release branch');
33+
34+
// Get current labels
35+
const { data: currentLabels } = await github.rest.issues.listLabelsOnIssue({
36+
owner,
37+
repo,
38+
issue_number: issueNumber
39+
});
40+
41+
// Check if 'release' label is already applied
42+
const hasReleaseLabel = currentLabels.some(label => label.name === 'release');
43+
44+
if (!hasReleaseLabel) {
45+
console.log('Adding release label');
46+
await github.rest.issues.addLabels({
47+
owner,
48+
repo,
49+
issue_number: issueNumber,
50+
labels: ['release']
51+
});
52+
} else {
53+
console.log('Release label already exists');
54+
}
55+
56+
return true;
57+
} else {
58+
console.log('Not a release branch');
59+
return false;
60+
}
61+
62+
- name: Fetch base branch
63+
if: contains(github.event.pull_request.labels.*.name, 'release') || steps.check_branch.outputs.result == 'true'
64+
run: |
65+
git fetch origin ${{ github.event.pull_request.base.ref }}
66+
67+
- name: Generate PR content
68+
if: contains(github.event.pull_request.labels.*.name, 'release') || steps.check_branch.outputs.result == 'true'
69+
id: generate_content
70+
run: |
71+
# Fetch all tags
72+
git fetch --tags
73+
74+
# Find the most recent version tag (vx.x.x format)
75+
LATEST_TAG=$(git tag -l "v*.*.*" | sort -V | tail -n1)
76+
77+
# Skip the latest commit (the current PR commit)
78+
if [ -z "$LATEST_TAG" ]; then
79+
echo "No version tags found. Using all commits in branch except the latest."
80+
COMMITS=$(git log --pretty=format:"* %s" HEAD~1)
81+
else
82+
echo "Found latest tag: $LATEST_TAG"
83+
# Get all commits since the latest tag, excluding the latest commit
84+
COMMITS=$(git log --pretty=format:"* %s" $LATEST_TAG..HEAD~1)
85+
fi
86+
87+
# If no commits found, provide a clearer message
88+
if [ -z "$COMMITS" ]; then
89+
COMMITS="* No new commits since last release tag ($LATEST_TAG)"
90+
fi
91+
92+
# Create PR body content with the commits
93+
PR_BODY="## Release Changes\n\n"
94+
PR_BODY="${PR_BODY}${COMMITS}"
95+
96+
# Save to file to maintain formatting
97+
echo -e "$PR_BODY" > pr_body.txt
98+
99+
# Use delimiter for multiline output
100+
echo "pr_body<<EOF" >> $GITHUB_OUTPUT
101+
cat pr_body.txt >> $GITHUB_OUTPUT
102+
echo "EOF" >> $GITHUB_OUTPUT
103+
104+
- name: Update Pull Request
105+
if: contains(github.event.pull_request.labels.*.name, 'release') || steps.check_branch.outputs.result == 'true'
106+
uses: actions/github-script@v7
107+
with:
108+
github-token: ${{ secrets.GITHUB_TOKEN }}
109+
script: |
110+
const { issue: { number: issueNumber }, repo: { owner, repo } } = context;
111+
112+
const prBody = `${{ steps.generate_content.outputs.pr_body }}`;
113+
114+
github.rest.issues.update({
115+
owner,
116+
repo,
117+
issue_number: issueNumber,
118+
body: prBody
119+
});

IDEA_CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
* 2.7.9
2+
* feat: Implement template-based Markdown formatting for API documentation [(#1216)](https://github.com/tangcent/easy-yapi/pull/1216)
3+
4+
* build: update Kotlin daemon JVM arguments [(#1215)](https://github.com/tangcent/easy-yapi/pull/1215)
5+
6+
* refactor: improve AI response content handling [(#1214)](https://github.com/tangcent/easy-yapi/pull/1214)
7+
8+
* feat: Support Local LLM service [(#1212)](https://github.com/tangcent/easy-yapi/pull/1212)
9+
10+
* build(ci): add GitHub Actions workflow for automated releases [(#1213)](https://github.com/tangcent/easy-yapi/pull/1213)
111
* 2.7.8
212
* refactor: Enhance EasyApiSettingAI layout [(#1209)](https://github.com/tangcent/easy-yapi/pull/1209)
313

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugin_name=EasyYapi
2-
plugin_version=2.7.8.212.0
2+
plugin_version=2.7.9.212.0
33
kotlin.code.style=official
44
kotlin_version=2.1.0
55
junit_version=5.9.2
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
<a href="https://github.com/tangcent/easy-yapi/releases/tag/v2.7.8">v2.7.8(2025-03-18)</a><br>
1+
<a href="https://github.com/tangcent/easy-yapi/releases/tag/v2.7.9">v2.7.9(2025-03-23)</a><br>
22
<a href="https://github.com/tangcent/easy-yapi/blob/master/IDEA_CHANGELOG.md">Full Changelog</a>
33

44
<h3>Enhancements:</h3>
55

66
<ul>
7-
<li>feat: Add AI-powered translation support for API documentation (<a href="https://github.com/tangcent/easy-yapi/pull/1207">#1207</a>)</li>
7+
<li>feat: Implement template-based Markdown formatting for API documentation (<a href="https://github.com/tangcent/easy-yapi/pull/1216">#1216</a>)</li>
88

9-
<li>feat: Add support for AI-powered method inference (<a href="https://github.com/tangcent/easy-yapi/pull/1205">#1205</a>)</li>
9+
<li>feat: Support Local LLM service (<a href="https://github.com/tangcent/easy-yapi/pull/1212">#1212</a>)</li>
1010
</ul>
1111

1212
<h3>Fixes:</h3>
13-
14-
<ul>
15-
<li>fix: Fix project cache size always showing as zero in settings (<a href="https://github.com/tangcent/easy-yapi/pull/1204">#1204</a>)</li>
16-
</ul>

idea-plugin/src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<idea-plugin>
22
<id>com.itangcent.idea.plugin.easy-yapi</id>
33
<name>EasyYapi</name>
4-
<version>2.7.8.212.0</version>
4+
<version>2.7.9.212.0</version>
55
<vendor email="pentatangcent@gmail.com" url="https://github.com/tangcent">Tangcent</vendor>
66

77
<description><![CDATA[ Description will be added by gradle build]]></description>

0 commit comments

Comments
 (0)