Skip to content

Commit e1ed251

Browse files
authored
Merge branch 'allanoguis:main' into feature/nodejs-notes-added
2 parents e45275d + cd99d27 commit e1ed251

File tree

2 files changed

+31
-40
lines changed

2 files changed

+31
-40
lines changed
Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,27 @@
1-
# This is a basic workflow to help you get started with Actions
1+
name: Auto Message and Star
22

3-
name: First-Greeting
4-
5-
# Controls when the workflow will run
63
on:
7-
# Triggers the workflow on push or pull request events but only for the "main" branch
8-
watch:
9-
branches: [ "main" ]
10-
fork:
11-
branches: [ "main" ]
12-
# Allows you to run this workflow manually from the Actions tab
13-
workflow_dispatch:
4+
issues:
5+
types: [opened]
146

15-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
167
jobs:
17-
# This workflow contains a single job called "build"
18-
build:
19-
# The type of runner that the job will run on
8+
send-message:
209
runs-on: ubuntu-latest
2110

22-
# Steps represent a sequence of tasks that will be executed as part of the job
2311
steps:
24-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
25-
- uses: actions/checkout@v4
26-
27-
# Runs a single command using the runners shell
28-
- name: Run a one-line script
29-
run: echo Hi $USER_NAME!
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
3014

31-
# Runs a set of commands using the runners shell
32-
- name: Add HTML to greetings
15+
- name: Send welcome message
3316
run: |
34-
echo '<h1> Give us a star if you haven't yet </h1>' >> $GITHUB_STEP_SUMMARY
35-
echo '<a class="github-button" href="https://github.com/allanoguis/coding-notes" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star your-username/your-repo on GitHub">Star</a>' >> $GITHUB_STEP_SUMMARY
36-
echo '<script async defer src="https://buttons.github.io/buttons.js"></script>' >> $GITHUB_STEP_SUMMARY
17+
ISSUE_NUMBER=$(jq --raw-output .issue.number "$GITHUB_EVENT_PATH")
18+
COMMENT_BODY=$(cat <<EOF
19+
Hi @${{ github.actor }}! Thanks for opening this issue. If you haven't already, please consider starring our repository to support us!
20+
<h1>Give us a star if you haven't yet</h1>
21+
<a class="github-button" href="https://github.com/allanoguis/coding-notes" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star allanoguis/coding-notes on GitHub">Star</a>
22+
<script async defer src="https://buttons.github.io/buttons.js"></script>
23+
EOF
24+
)
25+
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/json" \
26+
-d "{\"body\": \"$COMMENT_BODY\"}" \
27+
"https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUMBER/comments"

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,19 @@ Site Reference: <https://www.framer.com/motion/introduction/>
5454

5555
## React JS
5656

57-
- [React JS Documentation](ReactJS/ReactJS-Documentation.md)
58-
- [React JS Components](ReactJS/ReactJS-Components.md)
59-
- [React JS Hooks](ReactJS/ReactJS-Hooks.md)
60-
- [React JS Styling](ReactJS/ReactJS-Styling.md)
61-
- [React JS Forms](ReactJS/ReactJS-Forms.md)
62-
- [React JS Routing](ReactJS/ReactJS-Routing.md)
63-
- [React JS Query](ReactJS/ReactJS-Query.md)
64-
- [React JS State](ReactJS/ReactJS-useState.md)
65-
- [React JS UseEffect](ReactJS/ReactJS-useEffect.md)
66-
- [React JS Use Context](ReactJS/ReactJS-useContext.md)
67-
- [React JS State Management](ReactJS/ReactJS-State-Management.md)
68-
- [React JS Testing](ReactJS/ReactJS-Testing.md)
69-
- [React JS Deployment](ReactJS/ReactJS-Deployment.md)
57+
- [React JS Documentation](ReactJS/React-Documentation.md)
58+
- [React JS Components](ReactJS/React-Documentation.md)
59+
- [React JS Hooks](ReactJS/React-Documentation.md)
60+
- [React JS Styling](ReactJS/styling.md)
61+
- [React JS Forms](ReactJS/forms.md)
62+
- [React JS Routing](ReactJS/routing.md)
63+
- [React JS Query](<ReactJS/React Query.md>)
64+
- [React JS State](ReactJS/useState.md)
65+
- [React JS UseEffect](ReactJS/UseEffect.md)
66+
- [React JS Use Context](ReactJS/useContext.md)
67+
- [React JS State Management](ReactJS/stateManagement.md)
68+
- [React JS Testing](ReactJS/testing.md)
69+
- [React JS Deployment](ReactJS/deployment.md)
7070

7171
## Next JS //TODO: update
7272

0 commit comments

Comments
 (0)