diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c049841 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: Comment on Issue + +on: + issues: + types: + - opened + +jobs: + comment: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Comment on issue + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const commentText = 'Hello! Thank you for opening this issue. We will look into it shortly.'; + const response = await github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: commentText, + }); + console.log(response); diff --git a/pom.xml b/pom.xml index 466e21e..0b7687c 100644 --- a/pom.xml +++ b/pom.xml @@ -45,3 +45,6 @@ + + +#######