You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by HeartSaVioR <gi...@git.apache.org> on 2016/06/06 23:20:46 UTC

[GitHub] storm pull request #1468: STORM-1885. python script for squashing and mergin...

Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1468#discussion_r65986785
  
    --- Diff: dev-tools/storm-merge-pr.py ---
    @@ -0,0 +1,468 @@
    +#!/usr/bin/env python
    +
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#    http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +
    +# Utility for creating well-formed pull request merges and pushing them to Apache. This script is a modified version
    +# of the one created by the Spark project (https://github.com/apache/spark/blob/master/dev/merge_spark_pr.py).
    +#
    +# Usage: ./storm-merge-pr.py (see config env vars below)
    +#
    +# This utility assumes you already have local a storm git folder and that you
    +# have added remotes corresponding to both:
    +# (i) the github apache storm mirror and
    +# (ii) the apache storm git repo.
    +
    +import json
    +import os
    +import re
    +import subprocess
    +import sys
    +import urllib2
    +
    +try:
    +    import jira.client
    +    JIRA_IMPORTED = True
    +except ImportError:
    +    JIRA_IMPORTED = False
    +
    +PROJECT_NAME = "storm"
    +
    +CAPITALIZED_PROJECT_NAME = "storm".upper()
    +
    +# Location of the local git repository
    +REPO_HOME = os.environ.get("%s_HOME" % CAPITALIZED_PROJECT_NAME, os.getcwd())
    +# Remote name which points to the GitHub site
    +PR_REMOTE_NAME = os.environ.get("PR_REMOTE_NAME", "apache-github")
    +# Remote name which points to Apache git
    +PUSH_REMOTE_NAME = os.environ.get("PUSH_REMOTE_NAME", "apache")
    +# ASF JIRA username
    +JIRA_USERNAME = os.environ.get("JIRA_USERNAME", "")
    +# ASF JIRA password
    +JIRA_PASSWORD = os.environ.get("JIRA_PASSWORD", "")
    +# OAuth key used for issuing requests against the GitHub API. If this is not defined, then requests
    +# will be unauthenticated. You should only need to configure this if you find yourself regularly
    +# exceeding your IP's unauthenticated request rate limit. You can create an OAuth key at
    +# https://github.com/settings/tokens. This script only requires the "public_repo" scope.
    +GITHUB_OAUTH_KEY = os.environ.get("GITHUB_OAUTH_KEY")
    +
    +GITHUB_USER = os.environ.get("GITHUB_USER", "apache")
    +GITHUB_BASE = "https://github.com/%s/%s/pull" % (GITHUB_USER, PROJECT_NAME)
    +GITHUB_API_BASE = "https://api.github.com/repos/%s/%s" % (GITHUB_USER, PROJECT_NAME)
    +JIRA_BASE = "https://issues.apache.org/jira/browse"
    +JIRA_API_BASE = "https://issues.apache.org/jira"
    +# Prefix added to temporary branches
    +TEMP_BRANCH_PREFIX = "PR_TOOL"
    +# TODO Introduce a convention as this is too brittle
    +RELEASE_BRANCH_PREFIX = "0."
    +
    +DEV_BRANCH_NAME = "trunk"
    --- End diff --
    
    `trunk` is not used for Storm project.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---