This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static sendSlackMessage(configFile: ApplicationConfigFile, message: string) { | |
try { | |
MessagingManager.getSlackApplicationInstance(configFile.signingSecret, configFile.token).client.chat.postMessage({ | |
channel: configFile.channelId, | |
mrkdwn: true, | |
text: message, | |
as_user: true, | |
parse: "full", | |
username: "Zilon" | |
}).then((response) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class GithubDependenciesManager { | |
private static GITHUB_LIBRARIES_FILE = "github-libraries.json"; | |
private static CONSOLE_LOGGING_KEY = "[Github Dependencies Manager]"; | |
private static GITHUB_CACHE_FILE = "github-libraries-cache.json"; | |
private static CONFIG_FILE = "config.json"; | |
/** | |
* Main Method to Start inside This Manager | |
* 1. Create and Validate the Local Json Files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios, { Axios } from "axios"; | |
export class NetworkInstance { | |
public static SUCCESS_RESPONSE_CODE = 200; | |
// General Url's For Requests | |
public static GROUP_ARTIFACTS = "/group-index.xml"; | |
public static GITHUB_REPOS_KEY = "/repos/"; | |
public static GITHUB_RELEASES_KEY = "/git/refs/tags"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from "@nestjs/common"; | |
import { Cron, CronExpression } from "@nestjs/schedule"; | |
@Injectable() | |
export class TasksService { | |
@Cron(CronExpression.EVERY_DAY_AT_1AM, { | |
name: "dependencies" | |
}) | |
handleCron() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install -g @nestjs/cli | |
npx nest new project-name | |
cd project-name | |
npm install --save @nestjs/schedule | |
npm install --save-dev @types/cron | |
npm install axios | |
npm install @slack/bolt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_metadata: | |
major_version: 1 | |
minor_version: 1 | |
display_information: | |
name: Zilon | |
features: | |
app_home: | |
home_tab_enabled: true | |
messages_tab_enabled: true | |
messages_tab_read_only_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"items": [ | |
"https://images.unsplash.com/photo-1549740425-5e9ed4d8cd34?ixlib=rb-1.2.1&ixi=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1350&q=80", | |
"https://images.unsplash.com/photo-1525919646094-d07bd618cd93?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1400&q=80", | |
"https://images.unsplash.com/photo-1482784160316-6eb046863ece?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80", | |
"https://images.unsplash.com/photo-1506404523803-9f9fa45e066e?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80", | |
"https://images.unsplash.com/photo-1495012379376-194a416fcc5f?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=667&q=80", | |
"https://images.unsplash.com/photo-1504714071067-f2880fba258a?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=675&q= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Provide a general summary of your changes in the Title above --> | |
<!--- If there is no changelog entry, label this PR as trivial to bypass the Danger warning --> | |
## Description | |
<!--- Describe your changes in detail --> | |
## Motivation and Context | |
<!--- Why is this change required? What problem does it solve? --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def artifactID = "vortex-spring-boot" | |
def rootDes = "Vortex SpringBoot is the Base Code TO Build Better Backend Projects" | |
def repoName = "Vortex-SptingBoot" | |
version = "1.0.3" | |
group = "io.vortex" | |
ext { | |
LibraryGroup = "io.vortex" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OffersWorker @Inject constructor(context: Context, workerParams: WorkerParameters) : CoroutineWorker(context, workerParams) { | |
private val notificationsRepository: NotificationRepository by lazy { | |
NotificationRepository() | |
} | |
override suspend fun doWork(): Result = coroutineScope { | |
notificationsRepository.getService() | |
.sendOffer(OfferBody("From Work Manager", "The Schedual Each Second")) |
NewerOlder