Skip to content

fix: release drafter v7#3548

Open
Timongcraft wants to merge 4 commits into
IntellectualSites:mainfrom
Timongcraft:fix/release-drafter-v7
Open

fix: release drafter v7#3548
Timongcraft wants to merge 4 commits into
IntellectualSites:mainfrom
Timongcraft:fix/release-drafter-v7

Conversation

@Timongcraft
Copy link
Copy Markdown
Contributor

@Timongcraft Timongcraft commented May 24, 2026

Overview

fix release-drafter v7 changing gh token usage

If you were using a specific access token using env.GITHUB_TOKEN: $MY_CUSTOM_TOKEN, migrate to the new token: input [...]
see release-drafter/release-drafter#1475

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
    - [ ] New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@Timongcraft Timongcraft requested a review from a team as a code owner May 24, 2026 23:03
@dordsor21 dordsor21 requested review from a team and NotMyFault May 25, 2026 08:08
Comment on lines +16 to +17
with:
token: ${{ secrets.GITHUB_TOKEN }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should work without, no?

Introduce the token input, replaces the (need for) GITHUB_TOKEN env variable. Defaults to ${{ github.token }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, right...

So it seems like you need to set the permissions in the workflow maybe?
Because they need to be set on the token and other workflows seem to set a permission
e.g. https://github.com/open-telemetry/opentelemetry-erlang-contrib/blob/main/.github/workflows/release-drafter.yml#L14-L15
And the old token via environment might have circumvented that maybe?

Error: Resource not accessible by integration - https://docs.github.com/rest/releases/releases#create-a-release

https://docs.github.com/en/rest/releases/releases?apiVersion=2026-03-10#create-a-release--fine-grained-access-tokens

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

permissions:
  contents: read

and

with:
  token: ${{ secrets.GITHUB_TOKEN }}

should lead to the desired result. That's what we're using at https://github.com/jenkinsci/jenkins/blob/master/.github/workflows/changelog.yml, where I got this original workflow from.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's needed as well, yea.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, the PR is failing still :/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But aren't external PRs restricted or am I missing something?
Maybe open one from this repo?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, iirc release drafter has always failed for PRs from foreign repositories - as it should. Could potentially update the action to not run in that case.

Copy link
Copy Markdown
Contributor Author

@Timongcraft Timongcraft May 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why it has to run on PRs either way, on push to main should suffice (just like Jenkins does it). Basically https://github.com/jenkinsci/jenkins/blob/ce830a65166fab4c7358bf6da44f8fdb29c1ce93/.github/workflows/changelog.yml#L5-L21

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

Successfully merging this pull request may close these issues.

4 participants