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

Fix JENKINS-69719: Fetch PR data from target repo #67

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

astos-marcb
Copy link
Contributor

@astos-marcb astos-marcb commented Aug 17, 2023

Jenkins token permissions potentially invalid to access source repo.
This is the cause of issue JENKINS-69719.

All required Gitea Pull Request data can be accessed via target repo.
Replace access to potentially inaccessible source repository by references in target repository Pull Request head.

Testing done

The change affects token/credential permission scope on the Gitea server.
With the changed source for data access, the MultiBranchPipeline scan completes.

Jenkins can pull/checkout (moving) head of pull request.
Resolution to commit hash is done independently in body of GiteaSCMFileSystem constructor.

Submitter checklist

Jenkins token permissions potentially invalid to access source repo.
All required Gitea Pull Request data can be accessed via target repo.
@lafriks lafriks added the bug label Sep 7, 2023
@astos-marcb
Copy link
Contributor Author

@justusbunsi any reservations on applying the change (apart form the obvious copy&pase style)?
And a possible timeline (with it) on 1.4.6? This change may affect some decisions on Gitea/Jenkins use here. 😄

@justusbunsi
Copy link
Member

@justusbunsi any reservations on applying the change (apart form the obvious copy&pase style)? And a possible timeline (with it) on 1.4.6? This change may affect some decisions on Gitea/Jenkins use here. 😄

@astos-marcb To be honest, I received the "review requested" notification back then and simply missed acting upon it after reading it. 🙏 Thank you for your ping.

I've no reservation on applying your changes. I was able to reproduce the mentioned issue with a non-admin user. Reviewed and tested your changes now. Well spotted. Thanks for your contribution. Even with such a delay on my side. Sorry for that.

Regarding release timeline: There is #60 also awaiting my review. I'm going to review that PR after merging yours. With #60 also merged, we should be ready to release 1.4.6. We'll see if I need to bump the dependencies for a successful release. Missed quite a few versions in the meantime. 😅

@justusbunsi justusbunsi merged commit b33cc3a into jenkinsci:master Nov 27, 2023
13 checks passed
@justusbunsi justusbunsi mentioned this pull request Nov 27, 2023
6 tasks
@astos-marcb astos-marcb deleted the fix-JENKINS-69719 branch November 29, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants