casassg / auto-merge-bot

A GitHub Action for managing reviews via CODEOWNERS
MIT License
5 stars 1 forks source link

unable to find codeowners file #5

Open anupamadas31 opened 1 year ago

anupamadas31 commented 1 year ago

Error: HttpError: Not Found Error trying to find CODEOWNERS file. Please set cwd properly.

Using the following code: name: Codeowners merging on: pull_request_target: { types: [opened, synchronize] } issue_comment: { types: [created] }

jobs: auto-merge-bot: runs-on: ubuntu-latest

steps:
  - uses: actions/checkout@v2
  - name: Run Codeowners merge check
    uses: casassg/auto-merge-bot@v0.3
    env:
      GITHUB_TOKEN: ${{ secrets.PR_TOKEN }}
    with:
      cwd: "./github"

Console output:

Run casassg/auto-merge-bot@v0.3 with: cwd: ./github merge_method: squash assign_reviewer: true env: GITHUB_TOKEN: *** Error: HttpError: Not Found Error trying to find CODEOWNERS file. Please set cwd properly. Changed files: /stacks/data_eng/anita_pratt/base_tables/table_a/Pulumi.yaml Found @anupamadas31 as owners of /stacks/data_eng/anita_pratt/base_tables/table_a/Pulumi.yaml Elegible reviewers: Arbitrary choosen as assigned reviewer! PR assigned: 9007199254740991 Assigned reviewer: . Sending welcome message! Seems PR user is only owner. Will accept anyone to merge or approve. Missing approvals for PR. Potential owners: Error: PR cannot be merged Setting labels: needs-lgtm Removing label: merge-ready Failed to remove label merge-ready Removing label: needs-manual-merge Failed to remove label needs-manual-merge Removing label: lgtm Failed to remove label lgtm Removing label: needs-merge Failed to remove label needs-merge

nevercast commented 4 months ago

The cwd should probably be .github/ based on the concatenation here: https://github.com/casassg/auto-merge-bot/blob/v0.3.6/index.js#L409

I tried that on my own repo, it still failed like yours is.