Skip to content

Commit

Permalink
chore(notify): debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Airkro committed Dec 22, 2023
1 parent 99fdc62 commit fca9d9c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 28 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/bring-it.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ on:
- master

jobs:
test:
strategy:
matrix:
os:
- macos-latest
- windows-latest
- ubuntu-latest
node:
- lts/*
- lts/-1
exclude:
- os: ubuntu-latest
node: lts/*
# test:
# strategy:
# matrix:
# os:
# - macos-latest
# - windows-latest
# - ubuntu-latest
# node:
# - lts/*
# - lts/-1
# exclude:
# - os: ubuntu-latest
# node: lts/*

runs-on: ${{ matrix.os }}
steps:
- name: Run
uses: airkro/bring-it@actions
with:
node-version: ${{ matrix.node }}
# runs-on: ${{ matrix.os }}
# steps:
# - name: Run
# uses: airkro/bring-it@actions
# with:
# node-version: ${{ matrix.node }}

publish:
needs: [test]
# needs: [test]
runs-on: ubuntu-latest
steps:
- name: Run
Expand Down
29 changes: 22 additions & 7 deletions packages/notify/lib/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -115,26 +115,41 @@ const configs = {
},
};

function getlog(since, until) {
function getlog(from, to) {
console.log({ from, to });

return gitlog({
repo: '.',
since,
until,
repo: process.cwd(),
branch: `${from}...${to}`,
fields: ['hash', 'abbrevHash', 'subject'],
});
}

function getLogs() {
try {
return getlog(GIT_PREVIOUS_COMMIT, GIT_COMMIT);
} catch {
return getlog('HEAD~5', 'HEAD');
} catch (error) {
console.error(error);

try {
return getlog('HEAD~5', 'HEAD');
} catch (error_) {
console.error(error_);

try {
return getlog('HEAD~1', 'HEAD');
} catch (error__) {
console.error(error__);

return [];
}
}
}
}

function getCommits() {
const io =
GIT_COMMIT === GIT_PREVIOUS_COMMIT
GIT_COMMIT && GIT_COMMIT === GIT_PREVIOUS_COMMIT
? []
: sortBy(
Object.entries(
Expand Down
2 changes: 1 addition & 1 deletion packages/notify/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bring-it/notify",
"version": "0.2.3",
"version": "0.2.7",
"description": "Send releases notifications",
"license": "MIT",
"author": {
Expand Down

0 comments on commit fca9d9c

Please sign in to comment.