Skip to content

[New game]: The Fearsome Three story based Game #891

[New game]: The Fearsome Three story based Game

[New game]: The Fearsome Three story based Game #891

Workflow file for this run

name: Comment and Label on Issue Opened
on:
issues:
types:
- opened
jobs:
comment_and_label:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Add comment
uses: actions/github-script@v4
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
script: |
const commentAuthor = context.payload.issue.user.login;
const commentBody = `Hey @${commentAuthor} ! \n Thank you for raising an issue 💗 \n You can self assign the issue by commenting /assign in comment 😀 \n Make sure you follow [CODE OF CONDUCT](https://github.com/kunjgit/GameZone/blob/main/.github/CODE_OF_CONDUCT.md) and [CONTRIBUTING GUIDELINES](https://github.com/kunjgit/GameZone/blob/main/.github/CONTRIBUTING_GUIDELINE.md) 🚀 \n Don’t Forget to ⭐ our [GameZone🎮](https://github.com/kunjgit/GameZone)\n Make sure you join our [Discord🕹️](https://discord.gg/fgwk4XZfxG) `;
const { owner, repo, number } = context.issue;
await github.issues.createComment({
owner: owner,
repo: repo,
issue_number: number,
body: commentBody
});
- name: Add label if issue body contains "GSSoC23"
id: check_label
run: |
if [[ $(echo "${{ github.event.issue.body }}" | grep -q "GSSoC23"; echo $?) == 0 ]]; then
echo "::set-output name=add_label::true"
else
echo "::set-output name=add_label::false"
fi
- name: Add label "GSSoC23"
if: ${{ steps.check_label.outputs.add_label == 'true' }}
uses: actions/github-script@v4
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
script: |
const { owner, repo, number } = context.issue;
await github.issues.addLabels({
owner: owner,
repo: repo,
issue_number: number,
labels: ["gssoc23"]
});