Project

General

Profile

Actions

action #56495

closed

coordination #56477: Implement notifications in case specific files were changed in PR

[functional][y] Develop GitHub App to notify in PR if staging files were modified

Added by oorlov over 4 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
SUSE QA - Milestone 30+
Start date:
2019-09-05
Due date:
% Done:

0%

Estimated time:
5.00 h

Description

Previous investigations and found limitations

The initial task was to Implement hint to trigger VR for staging in case modules used there are changed in the PR. We investigated 3 solutions (use Travis, use internal Jenkins, and use external Jenkins) to make the notifications as comment and find out the following limitations:

  • "Encrypted environment variables are not available to pull requests from forks due to the security risk of exposing such information to unknown code." (https://docs.travis-ci.com/user/environment-variables/). So that we are not able to provide github token to make a comment as expected in the Pull request from oorlov;
  • Internal Jenkins cannot be triggered by GitHub Webhook as it is not visible from the outside. Running cron job with some interval requires to check all the PRs every time and decide if the message should be put or not;
  • External Jenkins requires node to be located on physical machine in DMZ;
  • And finally, solution with posting a comment in PR requires special email to be created (in @suse.de or @suse.com domain) and GitHub account for the bot.

The Solution:

GitHub Checks API.
PROS:

  • No special email/GitHub account required;
  • Executed only when PR is triggered;
  • Posting notifications to Check area which is not spamming with a comment;
  • Just elegant and rather modern solution:)

Pre-requisites:

We've managed to get external server. Please collaborate with oorlov, as he has access to the server. This also can be used to test the app during the development. Or any other instance, e.g. EC2 micro are free for a year for new registrations.

Acceptance Criteria:

  1. GitHub App is running on the external server;
  2. The app is registered in os-autoinst/os-autoinst-distri-opensuse repo as GitHub App;
  3. It sends notification on PR if staging files were changed and asks to provide a verification run.
Actions

Also available in: Atom PDF