Skip to content

Improve backport job permissions #10390

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

Merged
merged 1 commit into from
May 18, 2025
Merged

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented May 18, 2025

Followup to #10269

Noticed recently with #10388 that the backport to .github/workflows files still fails with the same error. After investigation and testing on my fork I found a solution that would work. For the backport to work we need the workflows permission. However that one isn't available for CI workflows. Instead we'd need to create a personal access token with the following permissions:

  • contents: write -> push new branches to Github
  • pull-requests: write -> create PR or add comment for manual backport
  • workflows: write -> modify files in .github/workflows

The actions: write permission I added in #10388 isn't necessary after all.

A side effect would be that we won't need to close / reopen PRs anymore before the workflow would run. By scoping the secret to an environment, we would also be able to enforce additional checks (like requiring sign-off) if we want to.

Is this something we want to do? If so, I can setup the PAT and environment.

@cdce8p cdce8p added Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry labels May 18, 2025
@cdce8p cdce8p requested a review from Pierre-Sassoulas May 18, 2025 10:02
Copy link
Contributor

🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉

This comment was generated for commit b83ec7d

@Pierre-Sassoulas
Copy link
Member

Sounds good to me ! Not having to close/open the backport MR would be nice (it's not voluntary afair).

@cdce8p
Copy link
Member Author

cdce8p commented May 18, 2025

👍🏻 PAT and environment are setup now. Let's backport this PR to test if everything works.

@cdce8p cdce8p merged commit 222ab20 into pylint-dev:main May 18, 2025
34 of 35 checks passed
@cdce8p cdce8p deleted the backport-permissions branch May 18, 2025 10:44
cdce8p added a commit that referenced this pull request May 18, 2025
@cdce8p
Copy link
Member Author

cdce8p commented May 18, 2025

Looks good! See #10391 for the backport PR.

Pierre-Sassoulas pushed a commit that referenced this pull request May 18, 2025
Pierre-Sassoulas added a commit that referenced this pull request Aug 9, 2025
…10487)

* [ci] Install pylint before every test (#10388) (#10389)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Improve backport job permissions (#10390) (#10391)

(cherry picked from commit 222ab20)

* Resolve `possibly-used-before-assignment` false positives from `match` block assignments (#10393)

(cherry picked from commit ad14b5b)

* Use custom Github App to authenticate backport job (#10394) (#10396)

(cherry picked from commit 6be8676)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Fix Pyreverse: Aggregations aren't filtered according to filter mode (PUB_ONLY, etc.) (#10379) (#10401)

* updated diagrams.py file

* added tests

* updated tests

* added test cases

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------


(cherry picked from commit ed59632)

Co-authored-by: pavan-msys <149513767+pavan-msys@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Fix Mermaid printer rendering double underscores as bold formatting (#10403) (#10410)

(cherry picked from commit 25a0f9e)

Co-authored-by: Julian Grimm <51880314+Julfried@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>

* Respect docstring-min-length in docparams extension (#10104) (#10434)

(cherry picked from commit 7f5e996)

Co-authored-by: Berker ŞAL <brkr.sal@gmail.com>

* Fix `unused-variable` false positive when using same name for multiple exceptions (#10436) (#10481)

(cherry picked from commit 9e72867)

Co-authored-by: Zen Lee <53538590+zenlyj@users.noreply.github.com>

* Fix false-negative for used-before-assignment with postponed evaluation in function defs (#10482) (#10483)

(cherry picked from commit d363fca)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Update pytest-benchmark requirement from ~=4.0 to ~=5.1 (#10066) (#10484)

(cherry picked from commit f04761b)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump pylint to 3.3.8, update changelog (#10486)

---------

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: pylint-backport-bot[bot] <212256041+pylint-backport-bot[bot]@users.noreply.github.com>
Co-authored-by: pavan-msys <149513767+pavan-msys@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Julian Grimm <51880314+Julfried@users.noreply.github.com>
Co-authored-by: Berker ŞAL <brkr.sal@gmail.com>
Co-authored-by: Zen Lee <53538590+zenlyj@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport maintenance/3.3.x Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants