Skip to content

Commit

Permalink
send to mattermost
Browse files Browse the repository at this point in the history
  • Loading branch information
Riron committed Mar 20, 2024
1 parent d058c6b commit 9de7198
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/mattermost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Create the Mattermost Message
run: |
echo "{\"text\":\"'${{ steps.list.outputs.prs }}'\"}" > mattermost.json
#- name: Send to Mattermost
# uses: mattermost/action-mattermost-notify@master
# env:
# MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
- name: Send to Mattermost
uses: mattermost/action-mattermost-notify@master
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
6 changes: 2 additions & 4 deletions scripts/gh-pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ module.exports = async ({ github, context, core }) => {
repo: context.repo.repo,
state: "open"
});
console.log(prs.data)

const prsReadyToReview = prs.data.filter(pr =>
pr.labels.some(label => label.name === "ready for review")
);

console.log(prsReadyToReview)

const output = prsReadyToReview
.map(pr => `- ${pr.title} (${pr.html_url})`)
.map(pr => `- ${pr.title} | [PR ${pr.number}](${pr.html_url})`)
.join("\n");
console.log(output)

Expand Down

0 comments on commit 9de7198

Please sign in to comment.