mirror of
https://gitea.com/Lydanne/pr-extract-issues.git
synced 2025-08-17 17:26:05 +08:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1fd5a8721a | ||
![]() |
b08ec27ac5 | ||
![]() |
0ca412d0d2 | ||
![]() |
3a607d78a3 | ||
![]() |
2befaf5c85 | ||
![]() |
a6c6e82280 | ||
![]() |
cb11554dba | ||
![]() |
4a030f7ef5 |
2
.github/workflows/extract-issues.yml
vendored
2
.github/workflows/extract-issues.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
way: 'title'
|
way: 'title'
|
||||||
issues-labels: 'l1, l2'
|
issues-labels: 'l1, l2'
|
||||||
remove-labels: 'bug'
|
remove-labels: 'bug, bug2'
|
||||||
filter-label: 'bug'
|
filter-label: 'bug'
|
||||||
issues-comment: |
|
issues-comment: |
|
||||||
HI。这个 issue: ${number} 已经被修复了。
|
HI。这个 issue: ${number} 已经被修复了。
|
||||||
|
21
CHANGELOG.md
21
CHANGELOG.md
@@ -1,5 +1,26 @@
|
|||||||
|
<!--
|
||||||
|
🐞 Bug fix
|
||||||
|
🚀 New feature
|
||||||
|
💄 Perf
|
||||||
|
📝 Docs
|
||||||
|
⚡️ Code style
|
||||||
|
🛠 refactor
|
||||||
|
-->
|
||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v1.2.2
|
||||||
|
|
||||||
|
`2025.02.10`
|
||||||
|
|
||||||
|
- 🐞 fix: undefined body. [#27](https://github.com/actions-cool/pr-extract-issues/pull/27) [@middiu](https://github.com/middiu)
|
||||||
|
|
||||||
|
## v1.2.1
|
||||||
|
|
||||||
|
`2022.09.23`
|
||||||
|
|
||||||
|
- fix: remove no exit label.
|
||||||
|
|
||||||
## v1.2.0
|
## v1.2.0
|
||||||
|
|
||||||
`2022.09.17`
|
`2022.09.17`
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# 🤠 PR Extract Issues
|
# 🤠 PR Extract Issues
|
||||||
|
|
||||||

|

|
||||||
[](https://github.com/marketplace/actions/pr-extract-issues)
|
[](https://github.com/marketplace/actions/pr-extract-issues)
|
||||||
[](https://github.com/actions-cool/pr-extract-issues/releases)
|
[](https://github.com/actions-cool/pr-extract-issues/releases)
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
extract:
|
extract:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions-cool/pr-extract-issues@v1.1.0
|
- uses: actions-cool/pr-extract-issues@v1
|
||||||
with:
|
with:
|
||||||
way: 'commit'
|
way: 'commit'
|
||||||
issues-labels: 'l1, l2'
|
issues-labels: 'l1, l2'
|
||||||
|
26516
dist/index.js
vendored
26516
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@umijs/fabric": "^2.5.6",
|
"@umijs/fabric": "^2.5.6",
|
||||||
"@vercel/ncc": "^0.27.0",
|
"@vercel/ncc": "0.34.0",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"new-github-release-url": "^1.0.0",
|
"new-github-release-url": "^1.0.0",
|
||||||
"open": "^7.3.0",
|
"open": "^7.3.0",
|
||||||
|
@@ -31,7 +31,7 @@ function getChangelog(content) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return changeLog.join('\n');
|
return changeLog.join('\n\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
const changelogPath = path.join(__dirname, '..', CHANGELOG_NAME);
|
const changelogPath = path.join(__dirname, '..', CHANGELOG_NAME);
|
||||||
|
15
src/main.js
15
src/main.js
@@ -27,7 +27,7 @@ async function run() {
|
|||||||
issues.push(it.replace('#', ''));
|
issues.push(it.replace('#', ''));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (way === 'body') {
|
} else if (way === 'body' && body) {
|
||||||
let arr = body.split('\n');
|
let arr = body.split('\n');
|
||||||
arr.forEach(it => {
|
arr.forEach(it => {
|
||||||
if (it.startsWith('#')) {
|
if (it.startsWith('#')) {
|
||||||
@@ -58,7 +58,7 @@ async function run() {
|
|||||||
const filterLabel = core.getInput('filter-label');
|
const filterLabel = core.getInput('filter-label');
|
||||||
if (filterLabel) {
|
if (filterLabel) {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
for await (let no of issues) {
|
for await (const no of issues) {
|
||||||
const {
|
const {
|
||||||
data: { labels },
|
data: { labels },
|
||||||
} = await octokit.issues.get({
|
} = await octokit.issues.get({
|
||||||
@@ -87,7 +87,7 @@ async function run() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for await (let issue of issues) {
|
for await (const issue of issues) {
|
||||||
if (labels) {
|
if (labels) {
|
||||||
await octokit.issues.addLabels({
|
await octokit.issues.addLabels({
|
||||||
owner,
|
owner,
|
||||||
@@ -98,7 +98,14 @@ async function run() {
|
|||||||
core.info(`Actions: [add-labels][${issue}][${labels}] success!`);
|
core.info(`Actions: [add-labels][${issue}][${labels}] success!`);
|
||||||
}
|
}
|
||||||
if (removeLabels && removeLabels.length) {
|
if (removeLabels && removeLabels.length) {
|
||||||
for (const label of removeLabels) {
|
const issueInfo = await octokit.issues.get({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
issue_number: issue,
|
||||||
|
});
|
||||||
|
const baseLabels = issueInfo.data.labels.map(({ name }) => name);
|
||||||
|
const removes = baseLabels.filter(name => removeLabels.includes(name));
|
||||||
|
for (const label of removes) {
|
||||||
await octokit.issues.removeLabel({
|
await octokit.issues.removeLabel({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
|
Reference in New Issue
Block a user