Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check-against-readme always looks for the project-level README #16

Open
markgoho opened this issue Jul 1, 2020 · 4 comments
Open

check-against-readme always looks for the project-level README #16

markgoho opened this issue Jul 1, 2020 · 4 comments

Comments

@markgoho
Copy link
Contributor

markgoho commented Jul 1, 2020

The token is definitely being passed in, but for whatever reason isn't being found.

 Ensure coverage has not dropped 📈4s
    GITHUB_TOKEN: ***
Run DEBUG=check-code-coverage npx set-gh-status --check-against-readme
  DEBUG=check-code-coverage npx set-gh-status --check-against-readme
  shell: /bin/bash -e {0}
  env:
    GITHUB_TOKEN: ***
npx: installed 69 in 3.549s
Token must be provided!
##[error]Process completed with exit code 1.

It looks like this package assumes everything is at the root folder. After adding cd clients/html && to the npx line, it works, but then it's looking for the badge at the root-level README which doesn't have a badge.

@bahmutov
Copy link
Owner

bahmutov commented Jul 1, 2020

Weird, the code is pretty straightforward here https://github.com/bahmutov/check-code-coverage/blob/master/bin/set-gh-status.js#L101

Is your action written like this?

- name: Ensure coverage has not dropped 📈
  run: npx set-gh-status --check-against-readme
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Is this a local pull request or a request from a forked repository?

@markgoho
Copy link
Contributor Author

markgoho commented Jul 1, 2020

@bahmutov so this was more a matter of not specifying the directory I was in, this now works:

- name: Ensure coverage has not dropped 📈
        run: cd clients/html && npx set-gh-status
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

However, if I try to check this against the README file, it looks for the root-level README. Is there a way we could look for a readme file in the directory that set-gh-status is being run in? Cf. https://github.com/bahmutov/check-code-coverage/blob/master/src/index.js#L70 -- how about: path.join(__dirname, 'README.md')?

image

@markgoho markgoho changed the title can't find github_token check-against-readme always looks for the project-level README Jul 1, 2020
@bahmutov
Copy link
Owner

bahmutov commented Jul 1, 2020 via email

@markgoho
Copy link
Contributor Author

markgoho commented Jul 1, 2020

#17 open for this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants