Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
feat(footer): welcome message has footer appened #45
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude committed Sep 9, 2020
1 parent 339dbbc commit 75e680b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- uses: ./src/welcome
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: '<h1>It''s great having you contribute to this project</h1> Feel free to raise an <strong>Issue</strong>! Welcome to the community :nerd_face: If any questions please ask in <a href="https://discord.com/invite/jZQs6Wu" target="_blank">Discord</a>'
pr-message: '<h1>It''s great having you contribute to this project</h1> Feel free to create a <strong>Pull Request</strong>! Welcome to the community :nerd_face: If any questions please ask in <a href="https://discord.com/invite/jZQs6Wu" target="_blank">Discord</a>'
issue-message: '<h1>It''s great having you contribute to this project</h1> Welcome to the community :nerd_face: If any questions please ask'
pr-message: '<h1>It''s great having you contribute to this project</h1> Welcome to the community :nerd_face: If any questions please ask'

statistics:
runs-on: ubuntu-latest
Expand Down
6 changes: 4 additions & 2 deletions src/welcome/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,21 @@ const github = require('@actions/github');
return;
}

const footer = '<p>If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our <a href="https://discord.com/invite/jZQs6Wu">Discord</a> chat and our <a href="https://github.com/EddieJaoudeCommunity">GitHub Organisation</a> - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.</p>';

if (!!context.payload.issue) {
await client.issues.createComment({
owner: context.issue.owner,
repo: context.issue.repo,
issue_number: context.issue.number,
body: issueMessage
body: issueMessage + footer
});
} else {
await client.pulls.createReview({
owner: context.issue.owner,
repo: context.issue.repo,
pull_number: context.issue.number,
body: prMessage,
body: prMessage + footer,
event: 'COMMENT'
});
}
Expand Down

0 comments on commit 75e680b

Please sign in to comment.