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

Add isOauth boolean parameter to the PersonalAccessToken type #1269

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Nov 29, 2024

What does this PR do?

Add isOauth boolean parameter to the PersonalAccessToken type to be able to filter tokens that was generated from oAuth. The tokenName parameter does not work for this case, because it is set from the original kubernetes secret object name, but not from the che.eclipse.org/scm-personal-access-token-name label.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

fixes eclipse-che/che#23241

Is it tested? How?

  1. Deploy the dashboard pull request image: quay.io/eclipse/che-dashboard:pr-1269
  2. Configure GitHub oauth, but do not authenticate it.
  3. Go to the dashboard User Preferences -> Personal Access Tokens tab and add a GitHub PAT.
  4. Go to the User Preferences -> Git Services tab and see that the GitHub authorisation is present but the authorisation status is empty and the kebab icon is disabled.

Release Notes

With this fix all git services items will have the authorized status, only if a related oAuth token was generated, but not with a manually added Personal Access Token.

Docs PR

@che-bot
Copy link
Contributor

che-bot commented Nov 29, 2024

Click here to review and test in web IDE: Contribute

@vinokurig vinokurig changed the title Add isOauth boolean parameter to the personalAccessToken type Add isOauth boolean parameter to the PersonalAccessToken type Nov 29, 2024
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1269

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1269", name: che-dashboard}]}}]"

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.43%. Comparing base (930cd8a) to head (0ffafb4).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1269      +/-   ##
==========================================
- Coverage   91.53%   91.43%   -0.10%     
==========================================
  Files         497      497              
  Lines       45501    45478      -23     
  Branches     3163     3161       -2     
==========================================
- Hits        41651    41585      -66     
- Misses       3820     3863      +43     
  Partials       30       30              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@artaleks9
Copy link
Contributor

Verified on Eclipse Che with quay.io/eclipse/che-dashboard:pr-1269 - the functionality works properly

Copy link

openshift-ci bot commented Dec 2, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, artaleks9, vinokurig

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

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

…/actions.spec.ts

Co-authored-by: Oleksii Kurinnyi <okurinny@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm label Dec 2, 2024
Copy link

openshift-ci bot commented Dec 2, 2024

New changes are detected. LGTM label has been removed.

Copy link

github-actions bot commented Dec 2, 2024

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1269

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1269", name: che-dashboard}]}}]"

@vinokurig vinokurig merged commit c8b0df0 into main Dec 2, 2024
18 of 21 checks passed
@vinokurig vinokurig deleted the che-23241 branch December 2, 2024 13:08
@devspacesbuild
Copy link

Build 3.19 :: dashboard_3.x/598: Console, Changes, Git Data

@devspacesbuild
Copy link

@devspacesbuild
Copy link

@devspacesbuild
Copy link

Build 3.19 :: get-sources-rhpkg-container-build_3.x/8287: FAILURE

dashboard : 3.x :: Failed in 66077195 : BREW:BUILD/STATUS:UNKNOWN
FAILURE:; copied to quay

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.

GitHub Authorization doesn't work properly
5 participants