Skip to content

Commit ee36682

Browse files
author
Thomas Osowski
committed
Merge branch 'osowskit/media-types' of github.com:github/platform-samples into osowskit/media-types
2 parents ea0e415 + 6910da5 commit ee36682

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

LICENSE renamed to LICENSE.txt

File renamed without changes.

api/ruby/discovering-resources-for-a-user/discovering_organizations.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
Octokit.auto_paginate = true
44

5-
Octokit.default_media_type = "application/vnd.github.moondragon+json"
6-
75
# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
86
# Instead, set and test environment variables, like below.
97
client = Octokit::Client.new :access_token => ENV["OAUTH_ACCESS_TOKEN"]

api/ruby/discovering-resources-for-a-user/discovering_repositories.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
Octokit.auto_paginate = true
44

5-
Octokit.default_media_type = "application/vnd.github.moondragon+json"
6-
75
# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
86
# Instead, set and test environment variables, like below.
97
client = Octokit::Client.new :access_token => ENV["OAUTH_ACCESS_TOKEN"]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
#
3+
# check commit messages for JIRA issue numbers formatted as [JIRA-<issue number>]
4+
5+
REGEX="\[JIRA\-[0-9]*\]"
6+
7+
ERROR_MSG="[POLICY] The commit doesn't reference a JIRA issue"
8+
9+
while read OLDREV NEWREV REFNAME ; do
10+
for COMMIT in `git rev-list $OLDREV..$NEWREV`;
11+
do
12+
MESSAGE=`git cat-file commit $COMMIT | sed '1,/^$/d'`
13+
if ! echo $MESSAGE | grep -iqE "$REGEX"; then
14+
echo "$ERROR_MSG: $MESSAGE" >&2
15+
exit 1
16+
fi
17+
done
18+
done
19+
exit 0

pre-receive-hooks/restrict-master-to-gui-merges.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)