Skip to content

Commit

Permalink
fix: don't duplicate commit messages for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebonsignori committed Aug 1, 2022
1 parent 3a446d4 commit 743d6a3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ jobs:
cache: npm
# install semantic-release plugins
- run: npm install --no-save semantic-release-plugin-github-breaking-version-tag
# configure git to push commit back to release branch
# configure git to push commit back to release branch with build
- run: |
git config user.name github-actions
git config user.email github-actions@github.com
npm run build
npm run package
LAST_MESSAGE=$(git log -1 HEAD --pretty=format:%s)
git add --all
git diff --quiet && git diff --staged --quiet || git commit -a --reuse-message=HEAD && git push
git diff --quiet && git diff --staged --quiet || git reset --soft HEAD~1 && git add --all && git commit -a -m $LAST_MESSAGE && git push
# do the release
- run: npx semantic-release --debug
env:
Expand Down
9 changes: 5 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,14 @@ function run(getCore, getOctokit, getSlack) {
});
}
function displayFilters(inputs) {
var _a, _b, _c, _d;
return `
<filter-only-unread>: ${inputs.filterOnlyUnread}
<filter-only-participating>: ${inputs.filterOnlyParticipating}
<filter-include-reasons>: ${inputs.filterIncludeReasons.join(", ")}
<filter-exclude-reasons>: ${inputs.filterExcludeReasons.join(", ")}
<filter-include-repositories>: ${inputs.filterIncludeRepositories.join(", ")}
<filter-exclude-repositories>: ${inputs.filterExcludeRepositories.join(", ")}
<filter-include-reasons>: ${((_a = inputs.filterIncludeReasons) === null || _a === void 0 ? void 0 : _a.join(", ")) || "[]"}
<filter-exclude-reasons>: ${((_b = inputs.filterExcludeReasons) === null || _b === void 0 ? void 0 : _b.join(", ")) || "[]"}
<filter-include-repositories>: ${((_c = inputs.filterIncludeRepositories) === null || _c === void 0 ? void 0 : _c.join(", ")) || "[]"}
<filter-exclude-repositories>: ${((_d = inputs.filterExcludeRepositories) === null || _d === void 0 ? void 0 : _d.join(", ")) || "[]"}
`;
}
// export `run` function for testing
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async function run(

if (!notificationsFetch.length) {
return core.info(
`No new notifications fetched since last run with given filters:\n<filter-only-unread>: ${inputs.filterOnlyUnread}\n<filter-only-participating>: ${inputs.filterOnlyParticipating}\n<`
`No new notifications fetched since last run with given filters:\n<filter-only-unread>: ${inputs.filterOnlyUnread}\n<filter-only-participating>: ${inputs.filterOnlyParticipating}`
);
}

Expand Down

0 comments on commit 743d6a3

Please sign in to comment.