code: private Map<String, String> returnEnvironmentVars(AbstractBuild<?, ?> build, TaskListener listener) {
          Map<String, String> envVars = Ghprb.getEnvVars(build, listener);
  
          if (!envVars.containsKey("ghprbUpstreamStatus")) {
              return null;
          }
  
          GhprbGitHubAuth auth = GhprbTrigger.getDscp()
                  .getGitHubAuth(envVars.get("ghprbCredentialsId"));
  
          try {
              GitHub gh = auth.getConnection(build.getProject());
              repo = gh.getRepository(envVars.get("ghprbGhRepository"));
              return envVars;
          } catch (Exception e) {
              LOGGER.log(Level.SEVERE, "Unable to connect to GitHub repo", e);
              return null;
          }
  
      }
docs: Gets all the custom env vars needed to send information to GitHub