Skip to content
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
54 changes: 30 additions & 24 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81503,7 +81503,7 @@ function getEmojiBlocks(name, type = 'rich_text_section') {
* @param [text] The sub-header text.
*/
function getFirstBlocks(orgs, header, text) {
return [
const headerBlock = [
{
text: {
emoji: true,
Expand All @@ -81512,31 +81512,37 @@ function getFirstBlocks(orgs, header, text) {
},
type: 'header',
},
...(text ? getContextMarkdownBlock(text) : []),
{
elements: orgs.flatMap((org) => [
{
text: {
emoji: true,
text: `${(0,_krauters_utils__WEBPACK_IMPORTED_MODULE_0__.capitalize)(org)} Org`,
type: 'plain_text',
},
type: 'button',
url: `${_constants_js__WEBPACK_IMPORTED_MODULE_1__/* .scmUrl */ .Hm}/${org}`,
];
const contextBlock = text ? getContextMarkdownBlock(text) : [];
const actionsBlock = [];
if (orgs.length > 0) {
const actionElements = [];
for (const org of orgs) {
actionElements.push({
text: {
emoji: true,
text: `${(0,_krauters_utils__WEBPACK_IMPORTED_MODULE_0__.capitalize)(org)} Org`,
type: 'plain_text',
},
{
text: {
emoji: true,
text: `${(0,_krauters_utils__WEBPACK_IMPORTED_MODULE_0__.capitalize)(org)} PRs`,
type: 'plain_text',
},
type: 'button',
url: `${_constants_js__WEBPACK_IMPORTED_MODULE_1__/* .prBaseUrl */ .Fh}${org}`,
type: 'button',
url: `${_constants_js__WEBPACK_IMPORTED_MODULE_1__/* .scmUrl */ .Hm}/${org}`,
});
actionElements.push({
text: {
emoji: true,
text: `${(0,_krauters_utils__WEBPACK_IMPORTED_MODULE_0__.capitalize)(org)} PRs`,
type: 'plain_text',
},
]),
type: 'button',
url: `${_constants_js__WEBPACK_IMPORTED_MODULE_1__/* .prBaseUrl */ .Fh}${org}`,
});
}
actionsBlock.push({
elements: actionElements,
type: 'actions',
},
];
});
}
return [...headerBlock, ...contextBlock, ...actionsBlock];
}
/**
* Get the last Slack block which includes footer markdown.
Expand Down Expand Up @@ -90359,7 +90365,7 @@ module.exports = {"version":"3.17.0"};
/***/ 8330:
/***/ ((module) => {

module.exports = /*#__PURE__*/JSON.parse('{"UU":"@krauters/github-notifier","rE":"1.0.0","TB":"https://buymeacoffee.com/coltenkrauter"}');
module.exports = /*#__PURE__*/JSON.parse('{"UU":"@krauters/github-notifier","rE":"1.0.1","TB":"https://buymeacoffee.com/coltenkrauter"}');

/***/ })

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

117 changes: 96 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@krauters/github-notifier",
"description": "GitHub Notifier by Krauters – Post Open Pull Requests to Slack",
"version": "1.0.0",
"version": "1.0.1",
"author": "Colten Krauter <coltenkrauter>",
"type": "module",
"homepage": "https://buymeacoffee.com/coltenkrauter",
Expand Down Expand Up @@ -41,17 +41,17 @@
"@actions/core": "1.11.1",
"@actions/github": "6.0.0",
"@krauters/utils": "^1.4.0",
"@octokit/types": "13.10.0",
"@octokit/types": "14.0.0",
"@slack/web-api": "7.9.1"
},
"devDependencies": {
"@krauters/eslint-config": "^1.8.0",
"@types/jest": "^29.5.14",
"@types/node": "^22.13.14",
"@types/node": "^22.14.1",
"@vercel/ncc": "^0.38.3",
"husky": "9.1.7",
"jest": "^29.7.0",
"ts-jest": "^29.3.0"
"ts-jest": "^29.3.2"
},
"bugs": {
"url": "https://github.com/krauters/github-notifier/issues/new?title=%5BBUG%5D+Brief+Description&template=bug_report.md"
Expand Down
Loading
Loading