Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: look nicer on PRs #18

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
1a7b433
afix: add missing comma
smlgbl Dec 28, 2021
59528e1
fix: add missing comma, remove extra "changelog"
smlgbl Dec 28, 2021
dd8cb16
fix: move changelog after check, check event keys and values
smlgbl Dec 28, 2021
590288a
fix: number not available
smlgbl Dec 28, 2021
d8f9352
fix: get keys
smlgbl Dec 28, 2021
54009bf
fix: remove debug output, add pull_request to payload
smlgbl Dec 28, 2021
4f5718f
fix: remove debug output, add pull_request to payload
smlgbl Dec 28, 2021
b12e91d
fix: use proper pull_request ref
smlgbl Dec 28, 2021
ae43f70
fix: use proper pull_request href
smlgbl Dec 28, 2021
4cbe120
fix: use proper pull_request href as uri
smlgbl Dec 28, 2021
f6379f7
fix: use proper pull_request href as uri
smlgbl Dec 28, 2021
60ebfc9
fix: use proper pull_request number as uri
smlgbl Dec 28, 2021
8a950a7
fix: use proper pull_request number as uri
smlgbl Dec 28, 2021
387ebe6
fix: use text from head_commit or pull_request event part
smlgbl Dec 29, 2021
8cc64af
fix: check commits array
smlgbl Dec 29, 2021
9fda4d4
fix: start with empty string
smlgbl Dec 29, 2021
7f31f7d
fix: revert to old package-lock.json to enable PR to upstream
smlgbl Dec 29, 2021
58b0f30
fix: revert to default values to enable PR to upstream
smlgbl Dec 29, 2021
388a03a
fix: use provided html url for PRs
smlgbl Dec 29, 2021
26cf548
feat: upgrade dependencies
smlgbl Dec 29, 2021
29c0710
feat: try to get link to run
smlgbl Dec 30, 2021
2509344
feat: try to get link with run_id
smlgbl Dec 30, 2021
95a50ea
feat: print github context
smlgbl Dec 30, 2021
aebd121
feat: add run_id as extra parameter
smlgbl Dec 30, 2021
35c8265
feat: add run_id as extra parameter, fix override
smlgbl Dec 30, 2021
5f4eaf4
fix: remove extra lint step - repo is abandoned
smlgbl Dec 30, 2021
431c84e
feat: upgrade dependencies
smlgbl Dec 30, 2021
7044832
feat: eat your own dogfood, disable scheduled codeQL
smlgbl Dec 30, 2021
0cc60ce
feat: shorten commit message (cut off on newline)
smlgbl Jan 4, 2022
2ee14e4
feat: Display each changelog line with bullet points
smlgbl Jan 4, 2022
bba98d4
feat: fix display for commit messages
smlgbl Jan 4, 2022
9b164da
feat: better fix for displaying commit messages
smlgbl Jan 11, 2022
aa965e7
feat: nicer wording on manual trigger/workflow_dispatch
smlgbl Jan 12, 2022
7c95f15
chore(deps): bump semver-regex from 3.1.3 to 3.1.4
dependabot[bot] Jun 4, 2022
6ccf4c4
Merge pull request #6 from smlgbl/dependabot/npm_and_yarn/semver-rege…
smlgbl Jul 28, 2022
871d9de
chore(deps): bump cross-fetch from 3.1.4 to 3.1.5
dependabot[bot] Jul 28, 2022
36c4e16
chore(deps): bump async from 2.6.3 to 2.6.4
dependabot[bot] Jul 28, 2022
24485da
chore(deps): bump follow-redirects from 1.14.5 to 1.15.1
dependabot[bot] Jul 28, 2022
8dde7b1
chore(deps): bump minimist from 1.2.5 to 1.2.6
dependabot[bot] Jul 28, 2022
121dd1d
Merge pull request #7 from smlgbl/dependabot/npm_and_yarn/follow-redi…
smlgbl Jul 28, 2022
6544529
Merge pull request #5 from smlgbl/dependabot/npm_and_yarn/async-2.6.4
smlgbl Jul 28, 2022
0709331
Merge pull request #3 from smlgbl/dependabot/npm_and_yarn/minimist-1.2.6
smlgbl Jul 28, 2022
e525ffe
Merge pull request #4 from smlgbl/dependabot/npm_and_yarn/cross-fetch…
smlgbl Jul 28, 2022
05d761a
chore(upgrades): update to node16, upgrade deps
smlgbl Oct 12, 2022
afcc7b8
chore(upgrades): re-add package-lock.json
smlgbl Oct 12, 2022
b484f17
chore(upgrades): remove failing outside dep
smlgbl Oct 12, 2022
f976d67
chore(upgrades): upgrade workflow deps as well
smlgbl Oct 12, 2022
095d859
chore(upgrades): upgrade botbuilder
smlgbl Oct 12, 2022
cba3419
Merge pull request #9 from smlgbl/node16
smlgbl Oct 12, 2022
756df42
chore(deps): bump @xmldom/xmldom from 0.7.5 to 0.7.8
dependabot[bot] Nov 1, 2022
3d1857c
chore(deps): bump json5 from 2.2.1 to 2.2.3
dependabot[bot] Jan 9, 2023
1750a90
Merge pull request #11 from smlgbl/dependabot/npm_and_yarn/xmldom/xml…
smlgbl Jan 4, 2024
ee26b8e
chore(deps): bump tough-cookie and @azure/ms-rest-js
dependabot[bot] Jan 4, 2024
2d2a100
chore(deps-dev): bump @babel/traverse from 7.19.4 to 7.23.7
dependabot[bot] Jan 4, 2024
358042e
chore(deps): bump xml2js and @azure/ms-rest-js
dependabot[bot] Jan 4, 2024
f1b7893
Merge pull request #12 from smlgbl/dependabot/npm_and_yarn/json5-2.2.3
smlgbl Jan 4, 2024
5459076
Merge pull request #13 from smlgbl/dependabot/npm_and_yarn/tough-cook…
smlgbl Jan 4, 2024
f3cd17e
chore(deps): bump zod and botbuilder
dependabot[bot] Jan 4, 2024
6125556
Merge pull request #15 from smlgbl/dependabot/npm_and_yarn/babel/trav…
smlgbl Jan 4, 2024
465e300
Merge pull request #16 from smlgbl/dependabot/npm_and_yarn/xml2js-and…
smlgbl Jan 4, 2024
e2c48ad
Merge pull request #18 from smlgbl/dependabot/npm_and_yarn/zod-and-bo…
smlgbl Jan 4, 2024
fd4daed
feat: upgrades to node20 (#20)
wanisfahmyDE Mar 7, 2024
47cb882
chore(upgrades): update codestyle
smlgbl Mar 7, 2024
e529b13
chore(upgrades): upgrade latest versions to work with node 20
smlgbl Mar 7, 2024
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
4 changes: 1 addition & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '17 8 * * 2'

jobs:
analyze:
Expand All @@ -38,7 +36,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/lint.yml

This file was deleted.

11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Release

on:
push:
Expand All @@ -9,10 +9,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- name: Install dependencies
run: npm ci
- name: Test
Expand All @@ -25,10 +25,11 @@ jobs:
run: npx semantic-release

- name: MSTeams Notification
uses: skitionek/notify-microsoft-teams@master
uses: smlgbl/notify-microsoft-teams@master
if: always()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
needs: ${{ toJson(needs) }}
job: ${{ toJson(job) }}
steps: ${{ toJson(steps) }}
run_id: ${{ github.run_id }}
42 changes: 11 additions & 31 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
success:
name: One with everything
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: MSTeams Notification
Expand All @@ -23,7 +23,7 @@ jobs:
needy_one:
name: One with needs
needs: success
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: MSTeams Notification
Expand All @@ -36,37 +36,16 @@ jobs:
steps: ${{ toJson(steps) }}
dry_run: ${{ !github.event.action == 'release' }}

steps_one:
name: One with steps
needs: success
runs-on: ubuntu-18.04
steps:
- name: Checkout from version control
uses: actions/checkout@master
- name: Do nothing 1
uses: skitionek/star-wars-quote-action@master
- name: Do nothing 2
uses: skitionek/star-wars-quote-action@master
- name: MSTeams Notification
uses: ./
if: always()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
needs: ${{ toJson(needs) }}
job: ${{ toJson(job) }}
steps: ${{ toJson(steps) }}
dry_run: ${{ !github.event.action == 'release' }}

failure:
name: One failure
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- id: Forced_failure
name: Forced failing step
run: |
echo "Output of this action will be localy overwriten to be a failure"
echo "Output of this action will be locally overwritten to be a failure"
echo "::set-output name=set_status::so_it_is_not_neglected"

- name: Overwrite status
Expand Down Expand Up @@ -107,7 +86,7 @@ jobs:

without_optional_params:
name: One with little info
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: MSTeams Notification
Expand All @@ -119,22 +98,23 @@ jobs:

with_overwrite:
name: One with overwrite
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: MSTeams Notification
uses: ./
if: always()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Overwrote title in ${workflow_link}`}"
overwrite: "{title: `Overwrote title for ${repository.name}`}"
job: ${{ toJson(job) }}
steps: ${{ toJson(steps) }}
run_id: ${{ github.run_id }}
dry_run: ${{ !github.event.action == 'release' }}

with_raw:
name: One with raw data
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: MSTeams Notification
Expand All @@ -146,7 +126,7 @@ jobs:
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"title": "No ${variables} avaliable in here",
"text": "Lorem ipssum"
"title": "No ${variables} available in here",
"text": "Lorem ipsum"
}
dry_run: ${{ !github.event.action == 'release' }}
80 changes: 77 additions & 3 deletions .idea/codeStyles/Project.xml

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

2 changes: 1 addition & 1 deletion .idea/codeStyles/codeStyleConfig.xml

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

8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ You can customize the following parameters:
|needs|optional|{}|JSON parsed needs context|
|dry_run|optional|False|Do not actually send the message|
|raw|optional|''|JSON object to send to Microsoft Teams|
|run_id|optional|''|Workflow run ID to create a direct link - unfortunately it's not included in the environment|
|overwrite|optional|''|JSON like object to overwrite default message (executed with eval)|

Please refer [action.yml](./action.yml) for more details.
Expand Down Expand Up @@ -63,6 +64,7 @@ jobs:
needs: ${{ toJson(needs) }}
job: ${{ toJson(job) }}
steps: ${{ toJson(steps) }}
run_id: ${{ github.run_id }}
dry_run: True


Expand All @@ -87,7 +89,7 @@ jobs:
if: always()
with:
webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }}
overwrite: "{title: `Overwrote title in ${workflow_link}`}"
overwrite: "{title: `Overwrote title for ${repository.name}`}"

with_raw:
name: One with raw data
Expand All @@ -103,11 +105,11 @@ jobs:
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"title": "No ${variables} avaliable in here"
"title": "No ${variables} available in here"
}

if_failure:
name: Only if failure
name: Only on failure
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
Expand Down
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
raw:
description: 'JSON object to send to Microsoft Teams'
required: false
run_id:
description: 'the run_id of the workflow, to provide a direct link in the message'
required: false
overwrite:
description: 'JSON like object to overwrite default message (executed with eval)'
required: false
Expand All @@ -24,7 +27,7 @@ inputs:
description: 'Do not actually send the message'
required: false
runs:
using: 'node12'
using: 'node20'
main: 'dist/index.js'
branding:
icon: 'bell'
Expand Down
Loading