-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* change workflow to use chain * change workflow to use chain * add copy of discord workflow * github event objecting - testing * github event objecting - testing * update modules * add resources to readme * remove console logs
- Loading branch information
1 parent
b16ba24
commit a90470c
Showing
1,096 changed files
with
820,756 additions
and
310,481 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Discord | ||
|
||
on: | ||
- push | ||
|
||
jobs: | ||
disord_test_message: | ||
runs-on: ubuntu-latest | ||
name: discord commits | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Send message to discord | ||
uses: ./ # Uses an action in the root directory | ||
with: | ||
webhook: ${{ secrets.DISCORD_WEBHOOK }} | ||
template: 'avatar-with-link' | ||
include-extras: true | ||
# message: "Successful commit to **{{ github.context.payload.repository.owner.name }}/{{ github.context.payload.repository.name}}**.\nDiff: {{ github.context.payload.compare }}" | ||
# embed: '{ "title": "{{ commit.title }}", "description": "{{ commit.description }}", "url": "{{ commit.url }}", "author": { "name": "{{ commit.author.name }} ({{ commit.author.username }})", "icon_url": "https://github.com/{{ commit.author.username }}.png"} }' | ||
# last-commit-only: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Entry | ||
|
||
on: | ||
workflow_run: | ||
workflows: | ||
- Discord | ||
- Discord Copy | ||
types: | ||
- completed | ||
|
||
jobs: | ||
disord_test_message: | ||
runs-on: ubuntu-latest | ||
name: discord commits | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'yarn' |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,9 +14,6 @@ const extraEmbeds = stringToBoolean(core.getInput("include-extras")) ? template. | |
|
||
const embed = stringOrFalse(core.getInput("embed")) || JSON.stringify(template.embed) | ||
|
||
console.log({ github }) | ||
console.log({ core }) | ||
|
||
const DATA = { | ||
env: { ...process.env }, | ||
github: { ...github }, | ||
|
@@ -29,7 +26,6 @@ if (lastCommitOnly) { | |
} | ||
|
||
let embeds = github.context.payload.commits.map(commit => { | ||
console.log({ commit }) | ||
return parseTemplate({ | ||
...DATA, | ||
commit: createCommit(commit), | ||
|
@@ -43,23 +39,6 @@ const payload = { | |
embeds: embeds.filter(x => x) | ||
} | ||
|
||
// console.log(defaultPayload) | ||
|
||
// const payload = { | ||
// content: "Hello world", | ||
// embeds: [ | ||
// { | ||
// title: "Hello embed", | ||
// description: "Hello embed description", | ||
// // url: "https://google.com", | ||
// author: { | ||
// name: "Wade Zimmerman", | ||
// // icon_url: "https://avatars.io/gravatar/[email protected]" | ||
// } | ||
// } | ||
// ] | ||
// } | ||
|
||
try { | ||
await fetch(`${webhook}?wait=true`, { | ||
method: 'POST', | ||
|
@@ -70,7 +49,8 @@ try { | |
body: JSON.stringify(payload) | ||
}) | ||
} catch (err) { | ||
console.error("Error:", err); | ||
console.error(err) | ||
core.error(err) | ||
core.setFailed( | ||
"Message :", | ||
err.response ? err.response.data : err.message | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.