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 ci.yml workflow #5078

Merged

Conversation

Akash-Singh04
Copy link
Contributor

What type of PR is this?

/kind feature

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 kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. labels Jun 22, 2024
@karmada-bot karmada-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels 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.38%. Comparing base (4124ba8) to head (165ebdf).
Report is 2 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    #5078   +/-   ##
=======================================
  Coverage   28.38%   28.38%           
=======================================
  Files         632      632           
  Lines       43798    43798           
=======================================
+ Hits        12431    12433    +2     
+ Misses      30462    30461    -1     
+ Partials      905      904    -1     
Flag Coverage Δ
unittests 28.38% <ø> (+<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.

Copy link
Contributor

@zhzhuang-zju zhzhuang-zju left a comment

Choose a reason for hiding this comment

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

thanks, others LGTM
There's something wrong with your commit, it's better to change it on the latest code

Comment on lines 16 to 17
contents: read # Adjust permissions as necessary
id-token: write # For OIDC tokens
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
contents: read # Adjust permissions as necessary
id-token: write # For OIDC tokens
contents: read # for actions/checkout to fetch code
id-token: write # for requesting the JWT

@Akash-Singh04 Akash-Singh04 force-pushed the toplevelpermissionsforCI.yml branch 2 times, most recently from 8f693d7 to f613849 Compare July 1, 2024 01:56
@karmada-bot karmada-bot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Jul 1, 2024
@Akash-Singh04
Copy link
Contributor Author

@zhzhuang-zju I have updated the commits to pass the tests, let me know if i should squash all of them

@zhzhuang-zju
Copy link
Contributor

@zhzhuang-zju I have updated the commits to pass the tests, let me know if i should squash all of them

Yes, squash all of them would be better

@@ -12,6 +12,9 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # for actions/checkout to fetch code
id-token: write # for requesting the JWT
Copy link
Contributor

Choose a reason for hiding this comment

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

refer to #5119 (comment), the write permissions can be declared at the run-level. Also, can you confirm whether write permission is required? The result given by the StepSecurity's online tool is that write permission is not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would be correct, write permission is not necessary

README.md Outdated
@@ -13,6 +13,7 @@
[![codecov](https://codecov.io/gh/karmada-io/karmada/branch/master/graph/badge.svg?token=ROM8CMPXZ6)](https://codecov.io/gh/karmada-io/karmada)
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B28176%2Fgit.luolix.top%2Fkarmada-io%2Fkarmada.svg?type=shield)](https://app.fossa.com/projects/custom%2B28176%2Fgit.luolix.top%2Fkarmada-io%2Fkarmada?ref=badge_shield)
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/karmada)](https://artifacthub.io/packages/krew/krew-index/karmada)
[![CLOMonitor](https://img.shields.io/endpoint?url=https://clomonitor.io/api/projects/cncf/karmada/badge)](https://clomonitor.io/projects/cncf/karmada)
Copy link
Contributor

Choose a reason for hiding this comment

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

#5054 has added CLOMonitor badge

@karmada-bot karmada-bot added the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Jul 4, 2024
@Akash-Singh04
Copy link
Contributor Author

@zhzhuang-zju Your requested changes have been made

Copy link
Contributor

@zhzhuang-zju zhzhuang-zju left a comment

Choose a reason for hiding this comment

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

@Akash-Singh04 please squash the commits. and then LGTM

@zhzhuang-zju
Copy link
Contributor

kindly ping @Akash-Singh04

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>
@karmada-bot karmada-bot removed the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Aug 6, 2024
@RainbowMango
Copy link
Member

I just helped rebase this PR, please @zhzhuang-zju take a look.

@zhzhuang-zju
Copy link
Contributor

I just helped rebase this PR, please @zhzhuang-zju take a look.

thanks~
/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 6, 2024
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/approve

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2024
@karmada-bot karmada-bot merged commit b4b6d69 into karmada-io:master Aug 6, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. 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