jefflinse / pr-semver-bump

A GitHub Action to bump and tag a new semantic version when a pull request is merged.
MIT License
24 stars 11 forks source link

Error on version bump: Resource not accessible by integration #42

Open maxhollmann opened 1 year ago

maxhollmann commented 1 year ago

I'm getting the error unexpected error: Resource not accessible by integration when running the version bump here.

Here's the definition for the failing workflow.

ImDevinC commented 8 months ago

I am getting this same issue, although I'm using a shared workflow. I've outlined the shared workflow as well as how I'm calling it, and the subsequent logs. Note that calling the validate action from a shared workflow does show proper version detection, and it looks to be failing only when trying to actually create the tag.

Shared workflow ```yaml name: Bump SemVer Tags on: workflow_call: inputs: include-v-prefix: description: "Include V prefix on published version" default: true required: false type: boolean jobs: bump-tag-version: name: Bump and tag version runs-on: ubuntu-latest outputs: version: ${{ steps.bump.outputs.version }} steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: Validate PR metadata uses: jefflinse/pr-semver-bump@v1.6.0 id: bump with: mode: bump repo-token: ${{ secrets.GITHUB_TOKEN }} minor-label: minor major-label: major patch-label: patch with-v: ${{ inputs.include-v-prefix }} ```
Calling Workflow ```yaml name: Bump SemVer Tags on: push: branches: - main jobs: bump-semver: uses: imdevinc/imdevinc/.github/workflows/shared-bump-semver-tags.yaml@v1 secrets: inherit ```
Logs ``` Run jefflinse/pr-semver-bump@v1.6.0 with: mode: bump repo-token: *** minor-label: minor major-label: major patch-label: patch with-v: true require-release-notes: false base-branch: false Processing version bump for PR request #[2](https://github.com/ImDevinC/go-links/actions/runs/7687696738/job/20948027591#step:3:2) HttpError: Resource not accessible by integration at /home/runner/work/_actions/jefflinse/pr-semver-bump/v1.6.0/webpack:/pr-semver-bump/node_modules/@octokit/request/dist-node/index.js:86:1 at processTicksAndRejections (node:internal/process/task_queues:96:[5](https://github.com/ImDevinC/go-links/actions/runs/7687696738/job/20948027591#step:3:5)) at createRelease (/home/runner/work/_actions/jefflinse/pr-semver-bump/v1.[6](https://github.com/ImDevinC/go-links/actions/runs/7687696738/job/20948027591#step:3:6).0/webpack:/pr-semver-bump/version.js:51:1) at bumpAndTagNewVersion (/home/runner/work/_actions/jefflinse/pr-semver-bump/v1.6.0/webpack:/pr-semver-bump/index.js:[9](https://github.com/ImDevinC/go-links/actions/runs/7687696738/job/20948027591#step:3:9)0:1) at run (/home/runner/work/_actions/jefflinse/pr-semver-bump/v1.6.0/webpack:/pr-semver-bump/index.js:[10](https://github.com/ImDevinC/go-links/actions/runs/7687696738/job/20948027591#step:3:10)6:1) Error: unexpected error: Resource not accessible by integration ```
ImDevinC commented 8 months ago

This was my fault, I was missing the following permissions (which are documented:

permissions:
  contents: write
  issues: read
  pull-requests: read
jefflinse commented 1 week ago

@maxhollmann I'm about a year and a half late to the party here; is this still an issue for you that wasn't resolved by fixing permissions (i.e. what @ImDevinC discovered)?