Skip to content

Commit

Permalink
Merge pull request #9 from Anjaliavv51/index
Browse files Browse the repository at this point in the history
📝[Documentation Update]: workflow update
  • Loading branch information
Anjaliavv51 authored Jul 30, 2024
2 parents a077bf2 + 84735bd commit 75c8f32
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug report 🐞
description: File a bug report
title: "🐞[Bug]: "
title: "🐞[bug]: "
body:
- type: checkboxes
id: existing-issue
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation_update.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 📝 Documentation Update
description: Improve Documentation
title: "📝[Documentation Update]: "
title: "📝[documentation Update]: "
body:
- type: checkboxes
id: existing-issue
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ✨ Feature Request
description: Suggest a feature
title: "✨[Feature Request]: "
title: "✨[feature Request]: "
body:
- type: checkboxes
id: existing-issue
Expand Down
22 changes: 10 additions & 12 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
<!-- ISSUE & PR TITLE SHOULD BE SAME-->
## Description
<!--Please include a brief description of the changes or features added-->

[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”]
<!--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): _______________
<!-- Mention PR Type according to the issue in brackets below and check the below box -->
- [ ] ()

## Screenshots / videos (if applicable)
[Attach any relevant screenshots or videos demonstrating the changes]
<!--Attach any relevant screenshots or videos demonstrating the changes-->


## Checklist

- [ ] I have gone through the [contributing guide](https://github.com/Anishkagupta04/RAPIDOC-HEALTHCARE-WEBSITE-/)
<!-- [X] - put a cross/X inside [] to check the box -->
- [ ] I have gone through the [contributing guide](https://github.com/Anjaliavv51/BoxMerge/)
- [ ] 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.
<!-- [X] - put a cross/X inside [] to check the box -->


## Additional context:
[Include any additional information or context that might be helpful for reviewers.]
<!--Include any additional information or context that might be helpful for reviewers.-->
45 changes: 45 additions & 0 deletions .github/workflows/add-gssoc-label-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Auto Label PR

on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
label_pr:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Label PR
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const pr = context.payload.pull_request;
const prBody = pr.body ? pr.body.toLowerCase() : '';
const prTitle = pr.title.toLowerCase();
const addLabel = async (label) => {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: [label]
});
};
if (prBody.includes('documentation') || prTitle.includes('doc') || prBody.includes('readme')) {
await addLabel('documentation');
}
if (prBody.includes('feature') || prBody.includes('enhancement') || prTitle.includes('add') || prTitle.includes('implement')) {
await addLabel('enhancement');
}
if (prBody.includes('bug') || prBody.includes('fix') || prTitle.includes('fix') || prTitle.includes('resolve')) {
await addLabel('bug');
}
if (prBody.includes('gssoc')) {
await addLabel('gssoc');
}
60 changes: 32 additions & 28 deletions .github/workflows/auto-label-issues.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,47 @@
name: Auto Label Issues
name: Auto Label Issue

on:
issues:
types: [opened, edited]
types: [opened, reopened, edited]

jobs:
label_issues:
label_issue:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@v6
- name: Label Issue
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = context.payload.issue;
const title = issue.title.toLowerCase();
const body = issue.body.toLowerCase();
const labels = [];
if (title.includes('gssoc') || body.includes('gssoc')) {
labels.push('GSSoC');
}
if (title.includes('enhancement') || body.includes('enhancement')) {
labels.push('Enhancement');
}
const issueBody = issue.body ? issue.body.toLowerCase() : '';
const issueTitle = issue.title.toLowerCase();
if (title.includes('bug') || body.includes('bug')) {
labels.push('Bug');
// Add gssoc label to all issues
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: ['gssoc']
});
const addLabel = async (label) => {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: [label]
});
};
if (issueBody.includes('documentation') || issueTitle.includes('doc') || issueBody.includes('readme')) {
await addLabel('documentation');
}
if (title.includes('documentation') || body.includes('documentation')) {
labels.push('Documentation');
if (issueBody.includes('feature') || issueBody.includes('enhancement') || issueTitle.includes('add') || issueTitle.includes('implement')) {
await addLabel('enhancement');
}
if (labels.length > 0) {
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.name,
labels: labels
});
if (issueBody.includes('bug') || issueBody.includes('fix') || issueTitle.includes('fix') || issueTitle.includes('resolve')) {
await addLabel('bug');
}
43 changes: 0 additions & 43 deletions .github/workflows/auto-label-pr.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/build-html-pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy static content to Pages

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
- 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."
issue-message: "Hi there! Thanks for opening this issue @${{ github.actor }}!. 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)"

0 comments on commit 75c8f32

Please sign in to comment.