diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..e3e5d73 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Discovered a Bug ? Feel free to report it +title: "[BUG] " +labels: bug +assignees: '' + +--- + +**Description** + +Please explain what you encountered and why you think it is a bug. +And what the expected behaviour would look like for you. + +**Github Runner Logs** +Please paste in your debug runner logs below: + +``` +REPLACE ME +``` + +**Workflow Config** +Please paste in your work flow definition: + +``` +REPLACE ME +``` + +**Git History** +In case a commit was not discovered correctly or classified wrong please provide the relevant history. +Please use `$ git log --pretty=format:"%H|||%h|||%s|||%an|||%ae"` and paste it below: + +``` +REPLACE ME +``` \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_report.md b/.github/ISSUE_TEMPLATE/feature_report.md new file mode 100644 index 0000000..d7495c7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_report.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Are you missing something? Feel free to share your Feature Request +title: "[IDEA]" +labels: enhancement +assignees: '' + +--- + +**What is lacking from the action?** +A clear and concise description of what the problem is. + +**How should it be solved?** +Please describe what your expected behaviour would look like. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/questions.md b/.github/ISSUE_TEMPLATE/questions.md new file mode 100644 index 0000000..baffa80 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/questions.md @@ -0,0 +1,10 @@ +--- +name: Question +about: You have a Question? Please leverage discussions! +title: '' +labels: question +assignees: '' + +--- + +Please use the issues section only for bugs and feature requests, questions and such are best handled in the discussion section. diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..2b9870c --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,21 @@ +name: Maintain Changelog +on: + workflow_dispatch: +permissions: + contents: write + pull-requests: write +jobs: + changelog: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Generate Changelog + uses: Templum/gitmoji-changelog@main + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + branch: feature/changelog-update + title: ":memo: Update Changelog for ${{ steps.outputs.for-version }}" + commit-message: ":memo: Update Changelog for ${{ steps.outputs.for-version }}" \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b25977e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: Branch Flow +on: + push: + paths-ignore: + - "./action/**" + - "./.devcontainer/**" + - ".gitignore" + - "LICENSE" + - "README.md" + branches: + - "main" + - "develop" +jobs: + flow: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: Install Dependencies + run: npm ci + - name: Check Lint + run: npm run check:lint + - name: Check Typescript + run: npm run check:tsc + - name: Run Unit Tests + run: npm run test:unit \ No newline at end of file diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 0000000..82e5999 --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,25 @@ +name: Maintain Compiled Action +on: + workflow_dispatch: +permissions: + contents: write + pull-requests: write +jobs: + changelog: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: Install Dependencies + run: npm ci + - name: Compile Action + run: npm run pack + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + branch: feature/changelog-update + title: ":package: Updated compiled action with latest code" + commit-message: ":package: Updated compiled action with latest code" \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..95a325c --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,31 @@ +name: Verify Pull Request +on: [pull_request] +permissions: + pull-requests: write +jobs: + flow: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: Install Dependencies + run: npm ci + - name: Check Lint + run: npm run check:lint + - name: Check Typescript + run: npm run check:tsc + - name: NCC Build + run: npm run build + - uses: ArtiomTr/jest-coverage-report-action@v2 + with: + package-manager: npm + continue-on-error: true + + \ No newline at end of file diff --git a/__tests__/shared/environment.spec.ts b/__tests__/shared/environment.spec.ts index 28861d0..40ba61f 100644 --- a/__tests__/shared/environment.spec.ts +++ b/__tests__/shared/environment.spec.ts @@ -1,3 +1,4 @@ +import { cwd } from 'node:process'; import { getBaseUrl, getRunnerArch, getRunnerOs, getWorkspace, isDebugging } from '../../src/shared/environment.js'; describe('Environment', () => { @@ -57,7 +58,7 @@ describe('Environment', () => { { method: getWorkspace, name: 'getWorkspace', - default: '/workspaces/gitmoji-changelog', + default: cwd(), }, { method: getRunnerOs,