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

Define top level Permission for cli.yml workflow #5079

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Akash-Singh04
Copy link

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:
Part of #5048

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jun 22, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@karmada-bot karmada-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 22, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jun 22, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.20%. Comparing base (0aa91d8) to head (8426c23).
Report is 8 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5079      +/-   ##
==========================================
- Coverage   28.21%   28.20%   -0.01%     
==========================================
  Files         632      632              
  Lines       43568    43557      -11     
==========================================
- Hits        12291    12284       -7     
+ Misses      30381    30374       -7     
- Partials      896      899       +3     
Flag Coverage Δ
unittests 28.20% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@@ -12,6 +12,9 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # Required to check out the code
id-token: write # Required for authentication methods
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
id-token: write # Required for authentication methods

permission id-token: write is unnecessary

@@ -54,5 +57,4 @@ jobs:
with:
cluster-resources: nodes,namespaces,
namespace-resources: configmaps,pods,svc
artifact-name: logs-${{ matrix.k8s}}

artifact-name: logs-${{ matrix.k8s}}
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to modify it here

@Akash-Singh04
Copy link
Author

@zhzhuang-zju Your requested changes have been made

Copy link
Contributor

@liangyuanpeng liangyuanpeng left a comment

Choose a reason for hiding this comment

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

please squash the commits. and then LGTM

@@ -55,4 +57,3 @@ jobs:
cluster-resources: nodes,namespaces,
namespace-resources: configmaps,pods,svc
artifact-name: logs-${{ matrix.k8s}}

Copy link
Contributor

Choose a reason for hiding this comment

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

this should not change.

@zhzhuang-zju
Copy link
Contributor

please squash the commits. and then LGTM

@Akash-Singh04 others LGTM

@Akash-Singh04 Akash-Singh04 force-pushed the toplevelpermissionsforcli.yml branch from 39903be to 207e78b Compare July 8, 2024 01:40
Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>

Removed excess permissions

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>

Removed newline

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>

Removed extra line

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>
@Akash-Singh04 Akash-Singh04 force-pushed the toplevelpermissionsforcli.yml branch from 207e78b to 8426c23 Compare July 8, 2024 01:42
@Akash-Singh04
Copy link
Author

@zhzhuang-zju Done

@@ -55,4 +57,4 @@ jobs:
cluster-resources: nodes,namespaces,
namespace-resources: configmaps,pods,svc
artifact-name: logs-${{ matrix.k8s}}

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

@Akash-Singh04
Refer to https://gist.github.com/camh-/1bebfcff1b0f814e9b191edc60d5206b, a github text file should end with a new line. The current cli.yaml file is actually end with two new lines, so you can choose to delete just one of the lines, or leave them alone. What you've done is actually remove a new line and add a line that contains invisible characters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants