This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import collections | |
import os | |
from pprint import pprint | |
import aiohttp | |
from gidgethub.aiohttp import GitHubAPI | |
async def get_repo(client, user): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getBranchName() { | |
def branchName = env.BRANCH_NAME | |
// if it is a PR, then we need to find back the name of the real branch from the commit. | |
if (branchName.contains("PR-")) { | |
repoUrl = sh(returnStdout: true, script: "echo ${env.CHANGE_URL} | sed 's/pull.*//'").trim() | |
// simulate a git fetch | |
// but stays on the current branch | |
git branch: branchName, credentialsId: 'github_username_password', url: repoUrl | |
// store the current commit | |
gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim() |