From bfbe1285ce253c3d5066acbdf4da411a7377eb2e Mon Sep 17 00:00:00 2001 From: shreyasbhat0 Date: Tue, 16 Jul 2024 17:32:39 +0530 Subject: [PATCH] chore: remove unused workflow --- .github/ISSUE_TEMPLATE/Bug.md | 51 ---------- .github/ISSUE_TEMPLATE/Feature.md | 56 ----------- .github/ISSUE_TEMPLATE/config.yml | 6 +- .github/workflows/test.workflow.pr.yml | 119 ----------------------- .github/workflows/test.workflow.push.yml | 75 -------------- 5 files changed, 1 insertion(+), 306 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/Bug.md delete mode 100644 .github/ISSUE_TEMPLATE/Feature.md delete mode 100644 .github/workflows/test.workflow.pr.yml delete mode 100644 .github/workflows/test.workflow.push.yml diff --git a/.github/ISSUE_TEMPLATE/Bug.md b/.github/ISSUE_TEMPLATE/Bug.md deleted file mode 100644 index 9a31734..0000000 --- a/.github/ISSUE_TEMPLATE/Bug.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -name: Bug Report -about: Report an issue you found with Copybara Action -labels: bug ---- - - - -## :beetle: Bug report - -### Summary - - - -### Expected behavior - - - -### Actual behavior - - - -### Steps to reproduce the problem - - - - - -### Environment - - - -- Version: - -### Possible fix - - diff --git a/.github/ISSUE_TEMPLATE/Feature.md b/.github/ISSUE_TEMPLATE/Feature.md deleted file mode 100644 index f97ff3c..0000000 --- a/.github/ISSUE_TEMPLATE/Feature.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -name: Feature Proposal -about: Tell us how Copybara Action can serve you better -labels: enhancement ---- - - - -## :bulb: Feature proposal - -### Use-cases - - - -### Example - - - -### Attempted solutions - - - -### Proposal - - - - - -### References - - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 87e2095..ec4bb38 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1 @@ -blank_issues_enabled: false -contact_links: - - name: Support and Questions - about: Do not open issues for questions - url: 'https://keybase.io/team/olivr' +blank_issues_enabled: false \ No newline at end of file diff --git a/.github/workflows/test.workflow.pr.yml b/.github/workflows/test.workflow.pr.yml deleted file mode 100644 index 2f91ef2..0000000 --- a/.github/workflows/test.workflow.pr.yml +++ /dev/null @@ -1,119 +0,0 @@ -name: "Test 'PR' Workflow" - -on: - pull_request: - push: - branches: - - main - -jobs: - # When new code is pushed on destination, create a PR to trigger an E2E test of the PR workflow - prepare-test: - name: "[Chore] Create Test Pull Request" - if: github.repository == 'olivr-test/copybara-action-test' && github.event_name == 'push' - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Get Commit Message - id: commit - run: | - MSG=$(git log --format=%B -n 1 ${{ github.event.after }}) - echo "::set-output name=COMMIT_MESSAGE::${MSG}" - - - name: Toggle test file - run: '[ -e "./.test-pr-workflow" ] && rm -rf ./.test-pr-workflow || echo "${{ github.sha }}" > ./.test-pr-workflow' - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 - env: - COMMIT_MESSAGE: ${{ steps.commit.outputs.COMMIT_MESSAGE }} - with: - commit-message: "[Test PR] ${{env.COMMIT_MESSAGE}}" - title: "[Test PR] ${{env.COMMIT_MESSAGE}}" - body: "Generated by workflow [${{ github.run_id }}](../actions/runs/${{ github.run_id }})" - token: ${{ secrets.GH_TOKEN_BOT }} - branch: test-pr-workflow - branch-suffix: short-commit-hash - - # When a new test PR is created on destination (by the job above), copy it to SoT - e2e-test: - name: "'PR' E2E tests" - if: github.repository == 'olivr-test/copybara-action-test' && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Test PR]') - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: "[Test] Basic usage" - uses: ./ - with: - sot_repo: Olivr/copybara-action - destination_repo: olivr-test/copybara-action-test - access_token: ${{ secrets.GH_TOKEN_BOT }} - ssh_key: ${{ secrets.GH_SSH_BOT }} - - - name: "🧹 Close Pull Request" - uses: actions/github-script@v3 - with: - github-token: ${{ secrets.GH_TOKEN_BOT }} - script: | - github.pulls.update({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - state: 'closed' - }); - - - name: "🧹 Delete PR branch" - run: git push origin :${{github.head_ref}} - - # When a new test PR is created on SoT (by the job above), close it - cleanup-test: - name: "[Chore] Close Test Pull Request" - if: github.repository == 'Olivr/copybara-action' && github.event_name == 'pull_request' && startsWith(github.event.pull_request.title, '[Test PR]') - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: "🧹 Close Pull Request" - uses: actions/github-script@v3 - with: - github-token: ${{ secrets.GH_TOKEN_BOT }} - script: | - github.pulls.update({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - state: 'closed' - }); - - - name: "🧹 Delete PR branch" - run: git push origin :${{github.head_ref}} - - # Once the test PR is cleaned up by the job above, it means all the tests have passed and we can release new code - release: - name: Release new version - needs: [cleanup-test] - runs-on: ubuntu-18.04 - steps: - - name: Checkout - uses: actions/checkout@master - with: - ref: main - - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 14 - - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN_BOT }} - # Trick semantic release because releasing from a PR is unusual but necessary in our case - run: GITHUB_EVENT_NAME=push GITHUB_REF=main npx semantic-release -e ./.config/release.config.js diff --git a/.github/workflows/test.workflow.push.yml b/.github/workflows/test.workflow.push.yml deleted file mode 100644 index f7bebb2..0000000 --- a/.github/workflows/test.workflow.push.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: "Test 'Push' Workflow" - -on: - push: - branches: - - main - -jobs: - # same job as build.yml copied here to keep build & E2E workflows separate - # Can be optimized once Github supports Actions partials - build: - name: Test build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 14 - - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Build - run: yarn build - - - name: Ensure build was committed (necessary for Github Actions) - run: "[[ -z $(git status -s dist) ]]" - - - name: "[Test] Unit tests" - run: yarn test - - e2e-test: - name: "'Push' E2E tests" - if: github.repository == 'Olivr/copybara-action' - needs: [build] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: "[Test] Basic usage" - uses: ./ - with: - sot_repo: Olivr/copybara-action - destination_repo: olivr-test/copybara-action-test - access_token: ${{ secrets.GH_TOKEN_BOT }} - ssh_key: ${{ secrets.GH_SSH_BOT }} - - - name: "[Test] Missing repos" - id: missing-repos - continue-on-error: true - uses: ./ - with: - destination_repo: olivr-test/copybara-action-test - ssh_key: ${{ secrets.GH_SSH_BOT }} - workflow: push - - name: ".........⏳" - if: steps.missing-repos.outcome != 'failure' || !startsWith(steps.missing-repos.outputs.msg, '[action]') - run: exit 1 - - - name: "[Test] Missing token" - id: missing-token - continue-on-error: true - uses: ./ - with: - sot_repo: Olivr/copybara-action - destination_repo: olivr-test/copybara-action-test - ssh_key: ${{ secrets.GH_SSH_BOT }} - - name: "..........⏳" - if: steps.missing-token.outcome != 'failure' || !startsWith(steps.missing-token.outputs.msg, '[action]') - run: exit 1