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

Could not find repository from '.' #22

Closed
PatrickHeneise opened this issue Sep 28, 2020 · 4 comments
Closed

Could not find repository from '.' #22

PatrickHeneise opened this issue Sep 28, 2020 · 4 comments

Comments

@PatrickHeneise
Copy link

I'm using semantic-release to create new tags/releases.

Semantic-Release uses the GITHUB_TOKEN to draft a new release, and according to GitHub, those actions do not trigger an event on GitHub Actions (such as on: release). The alternative is to trigger a workflow after semantic-release is done:

name: Sentry Release

on:
  workflow_run:
    workflows:
      - 'Semantic Release'
    branches:
      - main
    types:
      - completed

jobs:
  publish:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/github-script@v3
        id: release
        with:
          github-token: ${{secrets.GITHUB_TOKEN}}
          script: |
            const release = await github.repos.getLatestRelease({
              owner: context.repo.owner,
              repo: context.repo.repo
            });
            return release.name;
          result-encoding: string
      - name: Create Sentry release
        uses: getsentry/action-release@v1.0.0
        env:
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
          SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
          SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
          SENTRY_LOG_LEVEL: debug
        with:
          environment: production
          version: ${{steps.release.outputs.result}}

There are two issues

warning

Unexpected input(s) 'version', valid inputs are ['entryPoint', 'args', 'environment', 'sourcemaps', 'finalize', 'started_at']

Version is a parameter according to the readme.

failure

Second, something is wrong with the repositories:

DEBUG   2020-09-28 21:15:33.868807990 +00:00 < Link: <https://sentry.io/api/0/organizations/***/repos/?&cursor=100:-1:1>; rel="previous"; results="false"; cursor="100:-1:1", <https://sentry.io/api/0/organizations/***/repos/?&cursor=100:1:0>; rel="next"; results="false"; cursor="100:1:0"
...
DEBUG   2020-09-28 21:15:33.868871489 +00:00 response status: 200
DEBUG   2020-09-28 21:15:33.869251286 +00:00 body: [{
	"status": "active",
	"integrationId": "",
	"externalSlug": "***/api",
	"name": "***/api",
	"provider": {
		"id": "integrations:github",
		"name": "GitHub"
	},
	"url": "https://github.com/***/api"
}, {
	"status": "active",
	"integrationId": "",
	"externalSlug": "***/***",
	"name": "***/***",
	"provider": {
		"id": "integrations:github",
		"name": "GitHub"
	},
	"url": "https://github.com/***/***"
}]
INFO    2020-09-28 21:15:33.869439585 +00:00 Resolving HEAD (***/api@HEAD)
DEBUG   2020-09-28 21:15:33.869525384 +00:00 error: running update nagger
DEBUG   2020-09-28 21:15:33.869536184 +00:00 skipping update nagger because session is not attended
error: could not find repository from '.'; class=Repository (6); code=NotFound (-3)

The first thing that I see is that the repo is wrong (Resolving HEAD (***/api@HEAD), while the repo name is web) and then obviously error: could not find repository from '.'.

Not exactly sure what's going on? The secrets are all correct and I checked the requests in curl, the results are correct too.

@PatrickHeneise PatrickHeneise changed the title Could not find repository from ',' Could not find repository from '.' Sep 28, 2020
@teamSleek
Copy link

I am running into the same issue

@bendavies
Copy link

it needs a git repo to run in for some reason, so you need to

      - name: "Checkout"
        uses: actions/checkout@v2.3.1

@PatrickHeneise
Copy link
Author

Works with checkout, thank you!

@allanlei
Copy link

allanlei commented Jan 22, 2024

The actions/checkout requirement should be because of the default flag set_commits=auto

To not need the actions/checkout, you can set set_commits: skip for getsentry/action-release

https://docs.sentry.io/product/releases/associate-commits/
#136 (comment)

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

No branches or pull requests

4 participants