Skip to content

Conversation

@jeroenvervaeke
Copy link
Member

Proposed changes

Split the code coverage and commenting workflow into 2 workflows:

  1. The original workflow still runs code coverage and compares the code coverage like before, with a read-only token
    • Instead of commenting we save the comment as an artifact
  2. code-heatlth-comment-coverage.yml runs on the base of the branch (for security) with a write token and comments.

Jira ticket: CLOUDP-317733

@jeroenvervaeke jeroenvervaeke requested a review from a team as a code owner June 13, 2025 09:38
@fmenezes
Copy link
Collaborator

LGTM, I don't see the comment on this PR, did something happen?

@jeroenvervaeke jeroenvervaeke marked this pull request as draft June 13, 2025 10:11
@jeroenvervaeke
Copy link
Member Author

LGTM, I don't see the comment on this PR, did something happen?

You're right, back to the drawing board. As you pointed out offline, workflow_run only runs on master and not PRs

@fmenezes
Copy link
Collaborator

fmenezes commented Jun 13, 2025

I would change

- name: Comment PR
  uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db

to

- name: Comment PR
  uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db
  if: github.event.pull_request.head.repo.full_name == github.repository

and call it a day for this PR, then you open a new jira about making the comment on forks

I mean we can still see it on action summary, we just need to make sure anyone can see it

@jeroenvervaeke jeroenvervaeke marked this pull request as ready for review June 13, 2025 11:06
workflows: ["Code Health"]
types:
- completed
pull_request_target:
Copy link
Collaborator

Choose a reason for hiding this comment

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

[q] do you need both pull_request_target and pull_request ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

No, but it limits the permissions:

For workflows that are triggered by the pull_request_target event, the GITHUB_TOKEN is granted read/write repository permission unless the permissions key is specified and the workflow can access secre

fmenezes
fmenezes previously approved these changes Jun 13, 2025
@github-actions
Copy link
Contributor

Coverage Report 📈

Branch Commit Coverage
master b96671e 25.1%
CLOUDP-317733 3d3bd5e 25.1%
Difference 0%

@jeroenvervaeke jeroenvervaeke enabled auto-merge (squash) June 13, 2025 12:13
@jeroenvervaeke jeroenvervaeke merged commit 090acda into master Jun 13, 2025
22 checks passed
@jeroenvervaeke jeroenvervaeke deleted the CLOUDP-317733 branch June 13, 2025 13:22
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