Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

chore: add debug info for the payload #1044

Merged
merged 3 commits into from
Apr 15, 2021

Conversation

mdelapenya
Copy link
Contributor

@mdelapenya mdelapenya commented Apr 15, 2021

What does this PR do?

It renames variable not to pollute variable namespace, adding log traces for getting the payload

Why is it important?

It seems the pull_request field is not present in the payload when a comment is added to a PR, and this field is used to calculate the target branch and the current SHA of the PR

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the Unit tests for the CLI, and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

@mdelapenya mdelapenya self-assigned this Apr 15, 2021
@mdelapenya mdelapenya requested a review from a team April 15, 2021 08:54
@mdelapenya mdelapenya marked this pull request as ready for review April 15, 2021 08:54
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #1044 opened

  • Start Time: 2021-04-15T08:54:55.398+0000

  • Duration: 37 min 20 sec

  • Commit: 18dc7e7

Test stats 🧪

Test Results
Failed 0
Passed 141
Skipped 0
Total 141

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 141
Skipped 0
Total 141

We need a second API request, as the issue_comment API does not retrieve
data about the pull request. See
https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment
[key: 'GT_BODY', value: '$.comment.body'],
[key: 'GT_COMMENT_ID', value: '$.comment.id']
[key: 'GT_PAYLOAD', value: '$']
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For debugging purpose, will be reverted

@@ -53,6 +53,7 @@ pipeline {
PATH = "${env.HOME}/bin:${env.HOME}/node_modules:${env.HOME}/node_modules/.bin:${env.PATH}"
}
steps {
echo(message: "$env.GT_PAYLOAD")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For debugging purpose, will be reverted

@mdelapenya mdelapenya merged commit 2ac7071 into elastic:master Apr 15, 2021
@mdelapenya mdelapenya deleted the fix_webhook_variables branch April 15, 2021 10:15
@mdelapenya mdelapenya mentioned this pull request Apr 15, 2021
8 tasks
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #1044 updated

  • Start Time: 2021-04-15T09:59:06.286+0000

  • Duration: 32 min 30 sec

  • Commit: d8f347f

Test stats 🧪

Test Results
Failed 0
Passed 141
Skipped 0
Total 141

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 141
Skipped 0
Total 141

mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Apr 15, 2021
* master:
  chore: add debug info for the payload (elastic#1044)
  chore: add debug traces for the webhook payload (elastic#1043)
  fix: wrong interpolation (elastic#1042)
  Update Elastic Agent to not use Kibana (elastic#1036)
  fix: apply X version for non-master branches (elastic#1037)
  fix: add NodeJS to PATH (elastic#1035)
  fix: use an agent when building kibana (elastic#1030)
  fix(jjb): use a branch that exists (elastic#1029)
  remove uninstall step (elastic#1017)
  fix: delay checking stale agent version until it's used (elastic#1016)
  fix: use same JJB than in custom kibana (elastic#1010)
  chore: simplify PR template (elastic#1011)
  feat: support passing KIBANA_VERSION (elastic#905)
  [mergify] assign the original author (elastic#1009)
  Remove the agent config file parameters for stand alone (elastic#983)
  Uniquify the stand-alone step for checking agent status (elastic#993)
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Apr 19, 2021
* master:
  fix: check if kibana version is a commit (elastic#1047)
  fix: incorrect variable name (elastic#1046)
  fix: typo in parameters (elastic#1045)
  chore: add debug info for the payload (elastic#1044)
  chore: add debug traces for the webhook payload (elastic#1043)
  fix: wrong interpolation (elastic#1042)
  Update Elastic Agent to not use Kibana (elastic#1036)
  fix: apply X version for non-master branches (elastic#1037)
  fix: add NodeJS to PATH (elastic#1035)
  fix: use an agent when building kibana (elastic#1030)
  fix(jjb): use a branch that exists (elastic#1029)
  remove uninstall step (elastic#1017)
  fix: delay checking stale agent version until it's used (elastic#1016)
  fix: use same JJB than in custom kibana (elastic#1010)
  chore: simplify PR template (elastic#1011)
  feat: support passing KIBANA_VERSION (elastic#905)
  [mergify] assign the original author (elastic#1009)
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Apr 20, 2021
* fix: do not use variable names as variable prefix

* chore: print payload

* fix: perform another API call to fetch PR data

We need a second API request, as the issue_comment API does not retrieve
data about the pull request. See
https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Apr 20, 2021
* fix: do not use variable names as variable prefix

* chore: print payload

* fix: perform another API call to fetch PR data

We need a second API request, as the issue_comment API does not retrieve
data about the pull request. See
https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Apr 20, 2021
* fix: do not use variable names as variable prefix

* chore: print payload

* fix: perform another API call to fetch PR data

We need a second API request, as the issue_comment API does not retrieve
data about the pull request. See
https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment
mdelapenya added a commit that referenced this pull request Apr 20, 2021
…bhook payload (#1043) | chore: add debug info for the payload (#1044) | fix: typo in parameters (#1045) | fix: incorrect variable name (#1046) | fix: do not use GT_REPO va (#1057)

* fix: wrong interpolation (#1042)

* chore: add debug traces for the webhook payload (#1043)

* chore: add debug info for the payload (#1044)

* fix: do not use variable names as variable prefix

* chore: print payload

* fix: perform another API call to fetch PR data

We need a second API request, as the issue_comment API does not retrieve
data about the pull request. See
https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment

* fix: typo in parameters (#1045)

* fix: incorrect variable name (#1046)

* fix: do not use GT_REPO variable, use fixed repo name instead (#1049)

* fix: do not use GT_REPO variable, use fixed repo name

Because the repo is always Kibana, let's use it

* chore: remove unused echo
mdelapenya added a commit that referenced this pull request Apr 20, 2021
…bhook payload (#1043) | chore: add debug info for the payload (#1044) | fix: typo in parameters (#1045) | fix: incorrect variable name (#1046) | fix: do not use GT_REPO va (#1058)

* fix: wrong interpolation (#1042)

* chore: add debug traces for the webhook payload (#1043)

* chore: add debug info for the payload (#1044)

* fix: do not use variable names as variable prefix

* chore: print payload

* fix: perform another API call to fetch PR data

We need a second API request, as the issue_comment API does not retrieve
data about the pull request. See
https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment

* fix: typo in parameters (#1045)

* fix: incorrect variable name (#1046)

* fix: do not use GT_REPO variable, use fixed repo name instead (#1049)

* fix: do not use GT_REPO variable, use fixed repo name

Because the repo is always Kibana, let's use it

* chore: remove unused echo
mdelapenya added a commit that referenced this pull request Apr 20, 2021
…bhook payload (#1043) | chore: add debug info for the payload (#1044) | fix: typo in parameters (#1045) | fix: incorrect variable name (#1046) | fix: do not use GT_REPO va (#1059)

* fix: wrong interpolation (#1042)

* chore: add debug traces for the webhook payload (#1043)

* chore: add debug info for the payload (#1044)

* fix: do not use variable names as variable prefix

* chore: print payload

* fix: perform another API call to fetch PR data

We need a second API request, as the issue_comment API does not retrieve
data about the pull request. See
https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment

* fix: typo in parameters (#1045)

* fix: incorrect variable name (#1046)

* fix: do not use GT_REPO variable, use fixed repo name instead (#1049)

* fix: do not use GT_REPO variable, use fixed repo name

Because the repo is always Kibana, let's use it

* chore: remove unused echo
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants