Skip to content

[WIP] Fix failing GitHub Actions job "generate"#2943

Closed
brendandburns with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-github-actions-job-generate
Closed

[WIP] Fix failing GitHub Actions job "generate"#2943
brendandburns with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-github-actions-job-generate

Conversation

Copilot AI commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Fix the failing GitHub Actions job "generate"
Analyze the Actions logs, identify the root cause of the failure, and implement a fix.
Check run ID: 87420939716
Job URL: https://github.com/kubernetes-client/javascript/actions/runs/29435476145/job/87420939716

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 15, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 15, 2026

Copy link
Copy Markdown

CLA Not Signed

@kubernetes-prow kubernetes-prow Bot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 15, 2026
…erate workflow

The `gh pr create` command was failing with "GitHub Actions is not
permitted to create or approve pull requests" because the repository
setting "Allow GitHub Actions to create and approve pull requests" is
disabled.

`GITHUB_TOKEN` cannot create PRs when this setting is disabled,
regardless of workflow-level permissions. The fix is to use a
Personal Access Token (PAT) stored as a repository secret named
`GH_TOKEN` for the PR creation step.

The git push step continues to use `GITHUB_TOKEN` since pushing
branches is not restricted by this setting.

Admins need to create a PAT (classic PAT with "repo" scope, or
fine-grained PAT with "pull_requests: write" + "contents: write")
and store it as the `GH_TOKEN` repository secret.
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Copilot
Once this PR has been reviewed and has the lgtm label, please ask for approval from brendandburns. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 15, 2026
Copilot AI requested a review from brendandburns July 15, 2026 17:36
@brendandburns

Copy link
Copy Markdown
Contributor

@copilot is GH_TOKEN already populated? Or would I need to inject a new token?

Copilot AI commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@copilot is GH_TOKEN already populated? Or would I need to inject a new token?

GH_TOKEN is not currently configured as a repository secret — you would need to inject a new one. The steps are:

  1. Create a Personal Access Token:
  2. Add it as a repository secret named GH_TOKEN at https://github.com/kubernetes-client/javascript/settings/secrets/actions

The GITHUB_TOKEN (auto-generated per-run token) cannot create PRs when the organization setting "Allow GitHub Actions to create and approve pull requests" is disabled, so a PAT is required.

@brendandburns

Copy link
Copy Markdown
Contributor

Closing, since I don't want to use a PAT for this.

@mstruebing

Copy link
Copy Markdown
Member

"Allow GitHub Actions to create and approve pull requests"

Is there a way to allow this option?
Manually I can not click it so it needs to be some organizational setting but I believe others would need that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants