Skip to content

Actions fails when issues is disabled for the repository #302

Open
@Th3S4mur41

Description

@Th3S4mur41

I disabled the Issues feature for multiple repos in one of my orgs to track all issues through a single repository.
I still want to sync the labels to use in pull requests though.

As a result of disabling the feature, the job is now failing with the following error message:

{
	"message": "Resource not accessible by integration",
	"statusCode": 403,
	"headers": {
		"date": "Wed, 11 Dec 2024 10:56:54 GMT",
		"content-type": "application/json; charset=utf-8",
		"content-length": "155",
		"x-github-media-type": "github.v3; param=symmetra-preview; format=json",
		"x-accepted-github-permissions": "issues=write; pull_requests=write",
		"x-github-api-version-selected": "2022-11-28",
		"x-ratelimit-limit": "15000",
		"x-ratelimit-remaining": "14997",
		"x-ratelimit-reset": "1733918213",
		"x-ratelimit-used": "3",
		"x-ratelimit-resource": "core",
		"access-control-expose-headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
		"access-control-allow-origin": "*",
		"strict-transport-security": "max-age=31536000; includeSubdomains; preload",
		"x-frame-options": "deny",
		"x-content-type-options": "nosniff",
		"x-xss-protection": "0",
		"referrer-policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
		"content-security-policy": "default-src 'none'",
		"vary": "Accept-Encoding, Accept, X-Requested-With",
		"server": "github.com",
		"x-github-request-id": "FB51:3E02AA:4810CF:495386:67596FF6"
	},
	"body": {
		"message": "Resource not accessible by integration",
		"documentation_url": "https://docs.github.com/rest/issues/labels#add-labels-to-an-issue",
		"status": "403"
	},
	"method": "POST",
	"endpoint": "/repos/***/issues/346/labels"
}

If possible, the action should detect that the feature is disabled and not fail or alternatively offer an option to choose what to update (issues, pull request, all, or none).

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: pinnedShould not be labeled as staletype: bugVerified problems that need to be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions