1 line
7.5 KiB
JavaScript
1 line
7.5 KiB
JavaScript
"use strict";(self.webpackChunkpingvindocs=self.webpackChunkpingvindocs||[]).push([[723],{3953:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>a,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var s=t(4848),i=t(8453);const r={},l="Contributing",o={id:"help-out/contribute",title:"Contributing",description:"We would \u2764\ufe0f for you to contribute to Pingvin Share and help make it better! All contributions are welcome, including issues, suggestions, pull requests and more.",source:"@site/docs/help-out/contribute.md",sourceDirName:"help-out",slug:"/help-out/contribute",permalink:"/pingvin-share/help-out/contribute",draft:!1,unlisted:!1,editUrl:"https://github.com/stonith404/pingvin-share/edit/main/docs/docs/help-out/contribute.md",tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Translating",permalink:"/pingvin-share/help-out/translate"}},d={},c=[{value:"Getting started",id:"getting-started",level:2},{value:"Submit a Pull Request",id:"submit-a-pull-request",level:2},{value:"Setup project",id:"setup-project",level:2},{value:"Backend",id:"backend",level:3},{value:"Setup",id:"setup",level:4},{value:"Frontend",id:"frontend",level:3},{value:"Setup",id:"setup-1",level:4},{value:"Testing",id:"testing",level:3}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"contributing",children:"Contributing"})}),"\n",(0,s.jsx)(n.p,{children:"We would \u2764\ufe0f for you to contribute to Pingvin Share and help make it better! All contributions are welcome, including issues, suggestions, pull requests and more."}),"\n",(0,s.jsx)(n.h2,{id:"getting-started",children:"Getting started"}),"\n",(0,s.jsx)(n.p,{children:"You've found a bug, have suggestion or something else, just create an issue on GitHub and we can get in touch \ud83d\ude0a."}),"\n",(0,s.jsx)(n.h2,{id:"submit-a-pull-request",children:"Submit a Pull Request"}),"\n",(0,s.jsx)(n.p,{children:"Before you submit the pull request for review please ensure that"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["The pull request naming follows the ",(0,s.jsx)(n.a,{href:"https://www.conventionalcommits.org",children:"Conventional Commits specification"}),":"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:"<type>[optional scope]: <description>"})}),"\n",(0,s.jsx)(n.p,{children:"example:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"feat(share): add password protection\n"})}),"\n",(0,s.jsxs)(n.p,{children:["When ",(0,s.jsx)(n.code,{children:"TYPE"})," can be:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"feat"})," - is a new feature"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"doc"})," - documentation only changes"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"fix"})," - a bug fix"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"refactor"})," - code change that neither fixes a bug nor adds a feature"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Your pull request has a detailed description"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["You run ",(0,s.jsx)(n.code,{children:"npm run format"})," to format the code"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Don't know how to create a pull request? Learn how to create a pull request"}),(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Create a fork of the repository by clicking on the ",(0,s.jsx)(n.code,{children:"Fork"})," button in the Pingvin Share repository"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Clone your fork to your machine with ",(0,s.jsx)(n.code,{children:"git clone"})]}),"\n"]}),"\n"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ git clone https://github.com/[your_username]/pingvin-share\n"})}),(0,s.jsxs)(n.ol,{start:"3",children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Work - commit - repeat"}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Push changes to GitHub"}),"\n"]}),"\n"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"$ git push origin [name_of_your_new_branch]\n"})}),(0,s.jsxs)(n.ol,{start:"5",children:["\n",(0,s.jsxs)(n.li,{children:["Submit your changes for review\nIf you go to your repository on GitHub, you'll see a ",(0,s.jsx)(n.code,{children:"Compare & pull request"})," button. Click on that button."]}),"\n",(0,s.jsx)(n.li,{children:"Start a Pull Request"}),"\n",(0,s.jsxs)(n.li,{children:["Now submit the pull request and click on ",(0,s.jsx)(n.code,{children:"Create pull request"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"Get a code review approval/reject"}),"\n"]})]}),"\n",(0,s.jsx)(n.h2,{id:"setup-project",children:"Setup project"}),"\n",(0,s.jsx)(n.p,{children:"Pingvin Share consists of a frontend and a backend."}),"\n",(0,s.jsx)(n.h3,{id:"backend",children:"Backend"}),"\n",(0,s.jsxs)(n.p,{children:["The backend is built with ",(0,s.jsx)(n.a,{href:"https://nestjs.com",children:"Nest.js"})," and uses Typescript."]}),"\n",(0,s.jsx)(n.h4,{id:"setup",children:"Setup"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Open the ",(0,s.jsx)(n.code,{children:"backend"})," folder"]}),"\n",(0,s.jsxs)(n.li,{children:["Install the dependencies with ",(0,s.jsx)(n.code,{children:"npm install"})]}),"\n",(0,s.jsxs)(n.li,{children:["Push the database schema to the database by running ",(0,s.jsx)(n.code,{children:"npx prisma db push"})]}),"\n",(0,s.jsxs)(n.li,{children:["Seed the database with ",(0,s.jsx)(n.code,{children:"npx prisma db seed"})]}),"\n",(0,s.jsxs)(n.li,{children:["Start the backend with ",(0,s.jsx)(n.code,{children:"npm run dev"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"frontend",children:"Frontend"}),"\n",(0,s.jsxs)(n.p,{children:["The frontend is built with ",(0,s.jsx)(n.a,{href:"https://nextjs.org",children:"Next.js"})," and uses Typescript."]}),"\n",(0,s.jsx)(n.h4,{id:"setup-1",children:"Setup"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Start the backend first"}),"\n",(0,s.jsxs)(n.li,{children:["Open the ",(0,s.jsx)(n.code,{children:"frontend"})," folder"]}),"\n",(0,s.jsxs)(n.li,{children:["Install the dependencies with ",(0,s.jsx)(n.code,{children:"npm install"})]}),"\n",(0,s.jsxs)(n.li,{children:["Start the frontend with ",(0,s.jsx)(n.code,{children:"npm run dev"})]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"You're all set!"}),"\n",(0,s.jsx)(n.h3,{id:"testing",children:"Testing"}),"\n",(0,s.jsxs)(n.p,{children:["At the moment we only have system tests for the backend. To run these tests, run ",(0,s.jsx)(n.code,{children:"npm run test:system"})," in the backend folder."]})]})}function a(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>o});var s=t(6540);const i={},r=s.createContext(i);function l(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); |