From 3e32c689df8e5fdad0bfbf34162c945ecaf1092e Mon Sep 17 00:00:00 2001 From: Anjaliavv51 <154777864+Anjaliavv51@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:38:43 +0530 Subject: [PATCH 1/2] Game #1 --- Boxmerge in ReactJS/src/components/Game.js | 1 - 1 file changed, 1 deletion(-) diff --git a/Boxmerge in ReactJS/src/components/Game.js b/Boxmerge in ReactJS/src/components/Game.js index 1ab28a9..ea76716 100644 --- a/Boxmerge in ReactJS/src/components/Game.js +++ b/Boxmerge in ReactJS/src/components/Game.js @@ -110,5 +110,4 @@ function Game() { ); } - export default Game; \ No newline at end of file From f3f6bdbad5198f31a0081dcf130d3b9816192b4c Mon Sep 17 00:00:00 2001 From: Anjaliavv51 <154777864+Anjaliavv51@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:41:27 +0530 Subject: [PATCH 2/2] Added .github folder #1 --- .github/ISSUE_TEMPLATE/bug_report.yml | 53 +++++++++++++++ .../ISSUE_TEMPLATE/documentation_update.yml | 59 +++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 62 +++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 32 +++++++++ .../workflows/auto-comment-on-pr-merge.yml | 37 +++++++++++ .github/workflows/auto-label-issues.yml | 43 ++++++++++++ .github/workflows/auto-label-pr.yml | 43 ++++++++++++ .github/workflows/close-old-issue.yml | 55 ++++++++++++++++ .github/workflows/close-old-pr.yml | 41 ++++++++++++ .github/workflows/codeql.yml | 66 +++++++++++++++++++ .github/workflows/greetings.yml | 22 +++++++ .github/workflows/mkdocs.yaml | 27 ++++++++ 12 files changed, 540 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/documentation_update.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/auto-comment-on-pr-merge.yml create mode 100644 .github/workflows/auto-label-issues.yml create mode 100644 .github/workflows/auto-label-pr.yml create mode 100644 .github/workflows/close-old-issue.yml create mode 100644 .github/workflows/close-old-pr.yml create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/greetings.yml create mode 100644 .github/workflows/mkdocs.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..01e1dc4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,53 @@ +name: Bug report 🐞 +description: File a bug report +title: "🐞[Bug]: " +body: + - type: checkboxes + id: existing-issue + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the bug you encountered. + options: + - label: I have searched the existing issues + required: true + - type: textarea + id: what-happened + attributes: + label: Describe the bug + description: A concise description of what you are experiencing. + placeholder: Tell us what you see! + validations: + required: true + - type: textarea + id: expected-behaviour + attributes: + label: Expected behavior + description: A clear and concise description of what you expected to happen. + validations: + required: true + - type: textarea + id: screenshots + attributes: + label: Add ScreenShots + description: Add sufficient ScreenShots to explain your issue. + - type: dropdown + id: browsers + attributes: + label: What browsers are you seeing the problem on? + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge + - type: checkboxes + id: terms + attributes: + label: Record + options: + - label: "I have read the Contributing Guidelines" + required: true + - label: "I'm a GSSOC'24 contributor" + required: true + - label: "I have starred the repository" + required: true diff --git a/.github/ISSUE_TEMPLATE/documentation_update.yml b/.github/ISSUE_TEMPLATE/documentation_update.yml new file mode 100644 index 0000000..697e898 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation_update.yml @@ -0,0 +1,59 @@ +name: πŸ“ Documentation Update +description: Improve Documentation +title: "πŸ“[Documentation Update]: " +body: + - type: checkboxes + id: existing-issue + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the updates you want to make. + options: + - label: I have searched the existing issues + required: true + - type: textarea + id: issue-description + attributes: + label: Issue Description + description: Please provide a clear description of the documentation update you are suggesting. + placeholder: Describe the improvement or correction you'd like to see in the documentation. + validations: + required: true + - type: textarea + id: suggested-change + attributes: + label: Suggested Change + description: Provide details of the proposed change to the documentation. + placeholder: Explain how the documentation should be updated or corrected. + validations: + required: true + - type: textarea + id: rationale + attributes: + label: Rationale + description: Why is this documentation update necessary or beneficial? + placeholder: Explain the importance or reasoning behind the suggested change. + validations: + required: False + - type: dropdown + id: urgency + attributes: + label: Urgency + description: How urgently do you believe this documentation update is needed? + options: + - High + - Medium + - Low + default: 0 + validations: + required: true + - type: checkboxes + id: terms + attributes: + label: Record + options: + - label: "I have read the Contributing Guidelines" + required: true + - label: "I'm a GSSOC'24 contributor" + required: true + - label: "I have starred the repository" + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..dee0164 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,62 @@ +name: ✨ Feature Request +description: Suggest a feature +title: "✨[Feature Request]: " +body: + - type: checkboxes + id: existing-issue + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for this feature. + options: + - label: I have searched the existing issues + required: true + - type: textarea + id: feature-description + attributes: + label: Feature Description + description: Please provide a detailed description of the feature you are requesting. + placeholder: Describe the new feature or enhancement you'd like to see. + validations: + required: true + - type: textarea + id: use-case + attributes: + label: Use Case + description: How would this feature enhance your use of the project? + placeholder: Describe a specific use case or scenario where this feature would be beneficial. + validations: + required: true + - type: textarea + id: benefits + attributes: + label: Benefits + description: What benefits would this feature bring to the project or community? + placeholder: Explain the advantages of implementing this feature. + - type: textarea + id: screenShots + attributes: + label: Add ScreenShots + description: If any... + - type: dropdown + id: priority + attributes: + label: Priority + description: How important is this feature to you? + options: + - High + - Medium + - Low + default: 0 + validations: + required: true + - type: checkboxes + id: terms + attributes: + label: Record + options: + - label: "I have read the Contributing Guidelines" + required: true + - label: "I'm a GSSOC'24 contributor" + required: true + - label: "I have starred the repository" + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..da6f7f2 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,32 @@ +## Description + +[Please include a brief description of the changes or features added] + +## Related Issues + +[Cite any related issue(s) this pull request addresses. If none, simply state β€œNone”] +- Closes # + +## Type of PR + +- [ ] Bug fix +- [ ] Feature enhancement +- [ ] Documentation update +- [ ] Other (specify): _______________ + +## Screenshots / videos (if applicable) +[Attach any relevant screenshots or videos demonstrating the changes] + + +## Checklist + +- [ ] I have gone through the [contributing guide](https://github.com/Anishkagupta04/RAPIDOC-HEALTHCARE-WEBSITE-/) +- [ ] I have updated my branch and synced it with project `main` branch before making this PR +- [ ] I have performed a self-review of my code +- [ ] I have tested the changes thoroughly before submitting this pull request. +- [ ] I have provided relevant issue numbers, screenshots, and videos after making the changes. +- [ ] I have commented my code, particularly in hard-to-understand areas. + + +## Additional context: +[Include any additional information or context that might be helpful for reviewers.] diff --git a/.github/workflows/auto-comment-on-pr-merge.yml b/.github/workflows/auto-comment-on-pr-merge.yml new file mode 100644 index 0000000..c88e9cc --- /dev/null +++ b/.github/workflows/auto-comment-on-pr-merge.yml @@ -0,0 +1,37 @@ +name: Auto Comment on PR Merge + +on: + pull_request_target: + types: [closed] + +permissions: + issues: write + pull-requests: write + +jobs: + comment: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + + steps: + - name: Add Comment to Merged PR + run: | + COMMENT=$(cat < 0) { + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.name, + labels: labels + }); + } \ No newline at end of file diff --git a/.github/workflows/auto-label-pr.yml b/.github/workflows/auto-label-pr.yml new file mode 100644 index 0000000..f835bfa --- /dev/null +++ b/.github/workflows/auto-label-pr.yml @@ -0,0 +1,43 @@ +name: Auto Label PRs +on: + pull_request: + types: [opened, edited, synchronize] + +jobs: + label_prs: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v6 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const pr = context.payload.pull_request; + const title = pr.title.toLowerCase(); + const body = pr.body ? pr.body.toLowerCase() : ''; + + const labels = []; + + if (title.includes('gssoc') || body.includes('gssoc')) { + labels.push('GSSoC'); + } + + if (title.includes('enhancement') || body.includes('enhancement')) { + labels.push('Enhancement'); + } + + if (title.includes('bug') || body.includes('bug')) { + labels.push('Bug'); + } + + if (title.includes('documentation') || body.includes('documentation')) { + labels.push('Documentation'); + } + + if (labels.length > 0) { + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.name, + labels: labels + }); + } \ No newline at end of file diff --git a/.github/workflows/close-old-issue.yml b/.github/workflows/close-old-issue.yml new file mode 100644 index 0000000..d3e0e34 --- /dev/null +++ b/.github/workflows/close-old-issue.yml @@ -0,0 +1,55 @@ +name: Close Old Issues +on: + schedule: + - cron: "0 0 * * *" # Runs daily at midnight + +jobs: + manage-issues: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Manage Issues + run: | + open_issues=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + "https://api.github.com/repos/${{ github.repository }}/issues?state=open" \ + | jq -r '.[] | .number') + for issue in $open_issues; do + # Get issue details + issue_details=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + "https://api.github.com/repos/${{ github.repository }}/issues/$issue") + last_updated=$(echo $issue_details | jq -r '.updated_at') + labels=$(echo $issue_details | jq -r '.labels[].name') + + days_since_update=$(( ( $(date +%s) - $(date -d "$last_updated" +%s) ) / 86400 )) + + if [ $days_since_update -gt 7 ]; then + if echo "$labels" | grep -q "stale"; then + # If stale for more than 10 days, close the issue + if [ $days_since_update -gt 17 ]; then + curl -s -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -d '{"state":"closed"}' \ + "https://api.github.com/repos/${{ github.repository }}/issues/$issue" + + curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -d '{"body":"This issue has been automatically closed because it has been inactive for more than 17 days (including 7 days marked as stale). If you believe this is still relevant, feel free to reopen it or create a new one. Thank you!"}' \ + "https://api.github.com/repos/${{ github.repository }}/issues/$issue/comments" + fi + else + # Mark as stale + curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -d '{"labels":["stale"]}' \ + "https://api.github.com/repos/${{ github.repository }}/issues/$issue/labels" + + curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + -d '{"body":"This issue has been marked as stale because it has been inactive for more than 7 days. It will be closed if no further activity occurs in the next 10 days. Please update if you want to keep it open."}' \ + "https://api.github.com/repos/${{ github.repository }}/issues/$issue/comments" + fi + fi + done diff --git a/.github/workflows/close-old-pr.yml b/.github/workflows/close-old-pr.yml new file mode 100644 index 0000000..968963e --- /dev/null +++ b/.github/workflows/close-old-pr.yml @@ -0,0 +1,41 @@ + +name: Close PRs Without Linked Issues + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + close_prs_without_issue: + runs-on: ubuntu-latest + + steps: + - name: Check and Close PRs Without Linked Issues + uses: actions/checkout@v4 + with: + fetch-depth: 0 # This ensures that git history is fully fetched for proper processing + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Close PRs Without Linked Issues + run: | + const daysThreshold = 30; + const github = require('@actions/github'); + const octokit = new github.GitHub(process.env.GITHUB_TOKEN); + const owner = github.context.repo.owner; + const repo = github.context.repo.repo; + const { data: pullRequests } = await octokit.pulls.list({ owner, repo, state: 'open' }); + for (const pr of pullRequests) { + const { data: issues } = await octokit.issues.listForRepo({ owner, repo, per_page: 100 }); + const linkedIssue = issues.find(issue => + issue.pull_request && issue.pull_request.url === pr.url + ); + if (!linkedIssue) { + await octokit.pulls.update({ owner, repo, pull_number: pr.number, state: 'closed' }); + await octokit.issues.createComment({ + owner, + repo, + issue_number: pr.number, + body: "This pull request has been closed because it does not mention the issue that it solves. Please refer to the [Contributing files](https://github.com/Anishkagupta04/RAPIDOC-HEALTHCARE-WEBSITE-/blob/main/CONTRIBUTING.md) to help you add this information. Then, tag the maintainers so your PR can be reopened." + }); + } + } diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..8f716e5 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,66 @@ +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '20 12 * * 3' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + # only required for workflows in private repositories + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: javascript-typescript + build-mode: none + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..be87253 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,22 @@ +name: 'Greetings' + +on: + issues: + types: [opened] + pull_request_target: + types: [opened] +permissions: + issues: write + pull-requests: write + +jobs: + welcome: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: EddieHubCommunity/gh-action-community/src/welcome@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible." + pr-message: "Great job, @${{ github.actor }}! πŸŽ‰ Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project.We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our [contributing guidelines](https://github.com/Anshika14528/RAPIDOC-HEALTHCARE-WEBSITE-/blob/main/CONTRIBUTING.md)" + \ No newline at end of file diff --git a/.github/workflows/mkdocs.yaml b/.github/workflows/mkdocs.yaml new file mode 100644 index 0000000..bb8e881 --- /dev/null +++ b/.github/workflows/mkdocs.yaml @@ -0,0 +1,27 @@ +# name: Build site nightly + +# on: +# schedule: +# - cron: "0 0 * * *" + +# jobs: +# dot-release: +# name: dot-release +# runs-on: ubuntu-latest + +# steps: +# - name: curl +# env: +# NETLIFY_BUILD_HOOK: ${{ secrets.NETLIFY_BUILD_HOOK }} +# uses: wei/curl@v1 +# with: +# args: -X POST -d '{}' "$NETLIFY_BUILD_HOOK" + +# - name: Check response status +# run: | +# response=$(curl -s -o response.txt -w "%{http_code}" -X POST -d '{}' "$NETLIFY_BUILD_HOOK") +# if [ "$response" -ne 200 ]; then +# echo "Build trigger failed with status: $response" +# cat response.txt +# exit 1 +# fi