Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: solve issue that DEVELOP_BRANCH input is not used #11

Merged
merged 1 commit into from
Jun 25, 2024
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
32 changes: 22 additions & 10 deletions .github/workflows/gitflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@ jobs:
return `I recommend that you should modify ${{ env.CHANGELOG }}.`
}
})()
const response = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
});
const comments = response.map(json => json.body)
if (comments.some(comment => comment === message)) {
return
}
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
Expand Down Expand Up @@ -330,21 +339,23 @@ jobs:
gh release create $VERSION \
--generate-notes \
--notes '## Changelog'$'\n'"$CHANGELOG"$'\n' \
--target '${{ env.MAIN_BRANCH }}' \
--latest
git checkout -b '${{ env.SOURCE_BRANCH }}' '${{ env.SOURCE_COMMIT }}' \
&& git push -u origin '${{ env.SOURCE_BRANCH }}' \
|| :
PULL_REQUEST_NUMBER=$(
gh pr create \
--head '${{ env.SOURCE_BRANCH }}' \
--base 'develop' \
--title "update: ${{ env.SOURCE_BRANCH }} to develop" \
--body "update: ${{ env.SOURCE_BRANCH }} to develop" \
--base '${{ env.DEVELOP_BRANCH }}' \
--title "update: ${{ env.SOURCE_BRANCH }} to ${{ env.DEVELOP_BRANCH }}" \
--body "update: ${{ env.SOURCE_BRANCH }} to ${{ env.DEVELOP_BRANCH }}" \
| grep '\/pull\/[0-9][0-9]*' --only-matching \
| grep '[0-9][0-9]*' --only-matching
| grep '[0-9][0-9]*' --only-matching \
|| :
)
gh pr merge $PULL_REQUEST_NUMBER \
--subject "update: ${{ env.SOURCE_BRANCH }} to develop" \
--subject "update: ${{ env.SOURCE_BRANCH }} to ${{ env.DEVELOP_BRANCH }}" \
--admin \
--merge \
&& git push origin --delete ${{ env.SOURCE_BRANCH }} \
Expand All @@ -365,14 +376,15 @@ jobs:
PULL_REQUEST_NUMBER=$(
gh pr create \
--head '${{ env.SOURCE_BRANCH }}' \
--base 'develop' \
--title "update: ${{ env.SOURCE_BRANCH }} to develop" \
--body "update: ${{ env.SOURCE_BRANCH }} to develop" \
--base '${{ env.DEVELOP_BRANCH }}' \
--title "update: ${{ env.SOURCE_BRANCH }} to ${{ env.DEVELOP_BRANCH }}" \
--body "update: ${{ env.SOURCE_BRANCH }} to ${{ env.DEVELOP_BRANCH }}" \
| grep '\/pull\/[0-9][0-9]*' --only-matching \
| grep '[0-9][0-9]*' --only-matching
| grep '[0-9][0-9]*' --only-matching \
|| :
)
gh pr merge $PULL_REQUEST_NUMBER \
--subject "update: ${{ env.SOURCE_BRANCH }} to develop" \
--subject "update: ${{ env.SOURCE_BRANCH }} to ${{ env.DEVELOP_BRANCH }}" \
--admin \
--merge \
&& git push origin --delete ${{ env.SOURCE_BRANCH }} \
Expand Down
6 changes: 5 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
## 2.1.2

- fix: solve issue that DEVELOP_BRANCH input is not used

## 2.1.1

- fix: solve issue that github token is not applied to github command line tool

## 2.1.0

- feature: add customizable feature.
- feature: add customizable feature

## 2.0.0

Expand Down