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

Actions fails when issues is disabled for the repository #302

Open
Th3S4mur41 opened this issue Dec 11, 2024 · 5 comments
Open

Actions fails when issues is disabled for the repository #302

Th3S4mur41 opened this issue Dec 11, 2024 · 5 comments
Labels
status: pinned Should not be labeled as stale type: bug Verified problems that need to be worked on

Comments

@Th3S4mur41
Copy link

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).

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the status: stale Inactive issues and PRs label Dec 31, 2024
@Th3S4mur41
Copy link
Author

Reproduction is pretty easy...

  1. Create an issue
  2. Add a label to the issue
  3. Close the issue (optional)
  4. Disable "Issues" in repository settings (General)
  5. Execute the workflow

The workflow will fail with the error above

@EndBug
Copy link
Owner

EndBug commented Jan 2, 2025

Hi, thanks for reporting this.
I just looked through the issue and yeah, this is something that needs to be fixed in github-label-sync, as you noticed.
Thanks for opening Financial-Times/github-label-sync#188

I'll keep this pinned

@EndBug EndBug added type: bug Verified problems that need to be worked on status: pinned Should not be labeled as stale and removed status: stale Inactive issues and PRs labels Jan 2, 2025
@EndBug
Copy link
Owner

EndBug commented Jan 2, 2025

@all-contributors please add @Th3S4mur41 for their bug contribution

Copy link
Contributor

@EndBug

I've put up a pull request to add @Th3S4mur41! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pinned Should not be labeled as stale type: bug Verified problems that need to be worked on
Projects
None yet
Development

No branches or pull requests

2 participants