adobe/cla-bot

Can we forego the need to close and re-open pull request upon signing the CLA?

Closed this issue · 15 comments

I think we'd need the Adobe Sign API to have some kind of event or webhook to trigger a check on our side, right?

Yes, Adobe Sign APIs do have concept of webhook but I recall there was some challenge when we discussed about this earlier and then decided to go for the close and reopen the pull request. But we can discuss more on what's possible.

The CLA Assistant experience when sending a pull request to a github.com/magento repo is nice because it has none of the close/reopen - a nice streamlined experience.

Nice! We can take some inspiration! :)

Ok got it. So, Magento uses CLA Assistant for the CLA check. Which means we might have to go away from Adobe Sign and use CLA Assistant instead. https://cla-assistant.io/ https://github.com/cla-assistant/cla-assistant

We could configure a Sign webhook to trigger when Agreements get created and then deliver the Agreement Info to a new serverless action.

This action could then:

  • use the same code in lookup to parse form data for the data agreement to extract github username(s)
  • use the GitHub Search API to look for open pull requests in the adobe/magento/all installed orgs that were authored by said github usernames
  • post updates on the pull requests identified.

@hirenoble using CLA Assistant won't work as we need the specific CLA document signed as per legal requirements. CLA Assistant isn't much more than an authorization via GitHub Oauth - no actual document is signed.

I have started to look into this (FYI @okorshenko).

Having trouble right now creating the webhook on Adobe Sign's side since the account is under @stevengill's name, and he is on paternity leave, I need to get a hold of him to possibly create the webhook for us as I get this error trying to create the webhook:

StatusCodeError: 500 - {"code":"MISC_SERVER_ERROR","message":"Some miscellaneous error has occurred"}

@macdonst has been heroically dealing with Adobe Sign support for the past 6 weeks (!!!) to transfer the account to a shared Open Source Office account but this is proving to be its own headache.

In the mean time, I have deployed a cla-signwebhook action under the bot's namespace, so we are ready to register a service for the webhook. For registration of the webhook as per Adobe Sign REST API documentation for this the POST to /webhooks should include the following JSON body (so I don't forget / easy retries):

{ name: 'cla-signwebhook',
  scope: 'USER',
  state: 'ACTIVE',
  webhookSubscriptionEvents: [ 'AGREEMENT_ALL' ],
  webhookUrlInfo:
   { url:
      'https://adobeioruntime.net/api/v1/web/io-solutions/default/cla-signwebhook' },
  webhookConditionalParams:
   { webhookAgreementEvents:
      { includeDetailedInfo: true,
        includeDocumentsInfo: true,
        includeParticipantsInfo: false,
        includeSignedDocuments: false } } }

I am following up on the #adobe-sign corporate Slack channel for help.

I was informed to use a scope of USER and now am getting HTTP 500, following up with folks in the #sign-questions corporate slack channel.

Blocked on Adobe Sign, filed in their team issue tracker: https://jira.corp.adobe.com/browse/DCES-4256892

The above issue has been resolved (at least, a workaround was found) and I am unblocked here again. I continue onwards.

Well, hit another issue, this time it looks like im getting 'agreement not found' when I try to leverage the Adobe Sign search API using the agreement ID the webhook is receiving from signing event payloads... off to ask the Sign team again.

Got unblocked, need to use the v6 version of the search API with IDs returned by the webhook event payload (which is also v6). Don't cross API versions!

Hit an issue where apparently passing parameters between actions is not working as expected... on top of that it seems like the Adobe Sign webhook payload data structure changed today... sigh... I continue to debug and roll with the punches.

I redeployed the action and now things seem to be working....