communitybridge / easycla

The Contributor License Agreement (CLA) service of the Linux Foundation lets project contributors read, sign, and submit contributor license agreements easily.
https://easycla.lfx.linuxfoundation.org
MIT License
64 stars 45 forks source link

Pull Request Bot Comment Review for Corporate Contributor #1043

Closed WillsonHG closed 4 years ago

WillsonHG commented 4 years ago

Summary

Review the bot comment for a user without an ICLA and a company with a CCLA on file in a github pull request.

Background

  1. create a github pull request and be gated by easycla bot.

  2. EasyCLA checks the user and finds them in the Approved list of a company, but the user needs to verify (no ccla signature on file)

  3. Bot posts comment image

  4. User verifies with their company.

  5. Cla checks and finds ccla and updates checks in bottom section of PR as success, but does not update the previous failure comment. image

Expected behavior

Once the contributor verifies with their company and easycla finds the signature entry, the bot comment should be edited to show success. image The language in the failure comment also needs to be proofed for correct spacing and changed to "Approved List".

Environment

prod

Acceptance Criteria

dealako commented 4 years ago

Added help desk link as part of: https://github.com/communitybridge/easycla/pull/1080

dealako commented 4 years ago

It could be a refresh issue that is now resolved due to our updated check logic (which is now faster and doesn't look through all the signature on file).

For the last acceptance criteria:

  1. User is gated in GH - no employee signature on file
  2. User is in the "Approved List" by email/domain/gh user whatever but needs to be affiliated with a company
  3. EasyCLA sends the appropriate status update saying they need to be affiliated with their company
  4. All good
  5. The user goes into contributor console, and affiliates with their company
  6. The logic that refreshes the PR:
    1. Updates the Check
    2. DOES NOT update the comment ----> this is what needs to be updated
nirupamav commented 4 years ago

@WillsonHG Since the issue is related #722 Should we reopen this or should we close this ticket

WillsonHG commented 4 years ago

I want to keep this open.

dealako commented 4 years ago

Still need to resolve: "After the contributor verifies their affiliation to their company and the status reports a success, the comment should be edited to show the success comment"

WillsonHG commented 4 years ago

A good example of how the comment should change from fail to passing is in the logs here https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logEventViewer:group=/aws/lambda/cla-backend-prod-githubactivity;stream=2020/06/01/%5B$LATEST%5D08b18bc037e14a3f8cc611ba6e39dd2a;start=2020-05-31T20:40:37Z

20:38:58 2020-06-01T20:38:58 INFO cla: Getting comment body for repository type: github 2020-06-01T20:38:58 INFO cla: Getting comment body for repository type: github  20:38:58 2020-06-01T20:38:58 DEBUG cla: Found previously failed checks - updating CLA comment in PR. 2020-06-01T20:38:58 DEBUG cla: Found previously failed checks - updating CLA comment in PR.  20:38:59 2020-06-01T20:38:59 DEBUG cla: Found matching CLA comment for PR: 1644 2020-06-01T20:38:59 DEBUG cla: Found matching CLA comment for PR: 1644  20:38:59 2020-06-01T20:38:59 DEBUG cla: Updating existing CLA comment for PR: 1644 with body: CLA Check
The committers are authorized under a signed CLA.

2020-06-01T20:38:59 DEBUG cla: Updating existing CLA comment for PR: 1644 with body: CLA Check
The committers are authorized under a signed CLA.  20:38:59 2020-06-01T20:38:59 DEBUG cla: EasyCLA App checks pass for PR: 1644 with authors: [('7ea61703407d025d23f21817f94fbf6aca0f1153', 'dependabot[bot]')] 2020-06-01T20:38:59 DEBUG cla: EasyCLA App checks pass for PR: 1644 with authors: [('7ea61703407d025d23f21817f94fbf6aca0f1153', 'dependabot[bot]')]  20:38:59 2020-06-01T20:38:59 DEBUG cla: Creating new CLA status on commit 7ea61703407d025d23f21817f94fbf6aca0f1153: success 2020-06-01T20:38:59 DEBUG cla: Creating new CLA status on commit 7ea61703407d025d23f21817f94fbf6aca0f1153: success  20:39:00 2020-06-01T20:39:00 INFO cla: Successfully posted status on PR 1644: Commit 7ea61703407d025d23f21817f94fbf6aca0f1153 2020-06-01T20:39:00 INFO cla: Successfully posted status on PR 1644: Commit 7ea61703407d025d23f21817f94fbf6aca0f1153

WillsonHG commented 4 years ago

https://github.com/cloudfoundry-incubator/eirini-release/pull/170

https://github.com/open-telemetry/opentelemetry-cpp/pull/195

dealako commented 4 years ago

Updated logic - see https://github.com/communitybridge/easycla/pull/1532

  1. 'not authorized'
  2. 'must confirm their affiliation'
  3. 'is missing the User'

The last case was missing - now added as part of the Pull Request.

dealako commented 4 years ago

Pushed to DEV

nirupamav commented 4 years ago

Testing blocked due to #1533

nirupamav commented 4 years ago

When contributor is authorized and contributor confirms affiliation with the company. Also contributor userid exists in EasyCLA DB image.png

When contributor is authorized and contributor confirms affiliation with the company. Also contributor userid does not exist in EasyCLA DB

image.png

image.png

image.png