Skip to content

Commit

Permalink
Merge pull request #318 from nckturner/changelog-gen
Browse files Browse the repository at this point in the history
Changelog gen
  • Loading branch information
k8s-ci-robot authored May 15, 2020
2 parents 50ad704 + b0ead60 commit 6e9918f
Show file tree
Hide file tree
Showing 62 changed files with 10,561 additions and 545 deletions.
13 changes: 0 additions & 13 deletions CHANGELOG-0.4.0.md

This file was deleted.

27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Release v0.5.1-alpha.1
* Fix CRD mapper blocking all others because caches never sync and revamp backend-mode flag ([#303](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/303), @wongma7)
* Update aws-sdk-go to version v1.30.0 ([#306](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/306), @nckturner)
* Bump k8s.io/ dependencies to 1.16.8 ([#305](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/305), @wongma7)
* chown aws-iam-authenticator to avoid permission denied ([#302](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/302), @wongma7)
* Indentation and unit test improvements ([#298](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/298), @bhagwat070919)
* Adding Rate limiting ec2:DescribeInstances API along with Batching for high TPS ([#292](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/292), @bhagwat070919)
* Restrict ClusterRole to readonly IAMIdentityMapping access ([#287](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/287), @rifelpet)
* added selector to spec and changed from extenstions to apps/v1 ([#291](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/291), @andarob)
* Add AWS AccessKeyID as an extra field in UserInfo ([#286](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/286), @pepov)
* Allow server port customization ([#278](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/278), @diversario)


Release v0.5.0
* Update aws-sdk version to 1.19.11 ([#216](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/216), @nckturner)
* Add credentials cache for expiring credentials ([#193](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/193), @llamahunter)
* Support Global Different Region STS Endpoints ([#173](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/173), @sunfuze)
* Add expiration to token creation. ([#160](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/160), @nckturner)
* Log STS response on successful authentication. ([#161](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/161), @nckturner)
* Allow session names to be forwarded with `--forward-session-name`. ([#134](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/134), @jrnt30)
* Add output format option for verify command. ([#126](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/126), @joshkurz)
* Add flags to configure the address and port to allow running the server locally. ([#124](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/124), @christopherhein)
* Add a flag to only output the token. ([#122](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/122), @christopherhein)
* Add --log-format server flag to configure output format. ([#73](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/73), @phillipj)
* Build release for windows. ([#113](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/113), @acaire)
* Add support for ARNs with paths. ([#103](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/103), @mattlandis)
* GetWithSTS and GetWithRoleForSession added to Generator interface to allow tools integrating with Authenticator to pass an existing STS client or existing session. ([#101](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/101), @errordeveloper)
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 h1:Ao/3l156eZf2AW5wK8a7/smto
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down
63 changes: 63 additions & 0 deletions hack/changelog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/env python3

import argparse
import re
from subprocess import Popen, PIPE
import sys
from github import Github

# Generate a changelog from github commit history (pull request merges)

class ChangelogGenerator:
def __init__(self, github_repo, token):
self._github = Github(token)
self._github_repo = self._github.get_repo(github_repo)

def generate(self, pr_id):
pr = self._github_repo.get_pull(pr_id)
return f'{pr.title} ([#{pr_id}]({pr.html_url}), @{pr.user.login})'

def git_log(range=''):
process = Popen(['git', 'log', range], stdout=PIPE, stderr=PIPE)
stdout, stderr = process.communicate()
if process.returncode != 0:
raise RuntimeError(f'git log returned {process.returncode} and failed with error: {stderr.decode("utf-8")}')
return stdout.decode("utf-8")

if __name__ == '__main__':
parser = argparse.ArgumentParser(prog='changelog')
parser.add_argument('--token', help='Your github token.')
parser.add_argument('--changelog-file', help='The path to the changelog output file.')
parser.add_argument('--print-only', action='store_true', help='Only print the output.')
parser.add_argument('--range', help='The range of commit logs to inspect in the repository. You can (and should) use tags here. Example: v5..v10 (This argument is passed to git log, so read the git log documentation for clarification.')
parser.add_argument('--section-title', help='The title for the section in the changelog that is generated')
args = parser.parse_args()

if args.section_title is None:
print('--section-title is required')
sys.exit(1)
if args.token is None:
print('--token is required')
sys.exit(1)
if args.range is None:
print('--range is required')
sys.exit(1)
if args.changelog_file is None and args.print_only is None:
print('Either --print-only or --changelog-file is required.')
sys.exit(1)

logs = git_log(args.range)

changelog = f'{args.section_title}\n'
g = ChangelogGenerator('kubernetes-sigs/aws-iam-authenticator', args.token)
for pr_match in re.finditer(r'Merge pull request #(\d+)', logs):
pr_id = int(pr_match.group(1))
changelog += f'* {g.generate(pr_id)}\n'

if args.print_only:
print(changelog)
sys.exit(0)
else:
with open(args.changelog_file, 'w') as f:
f.write('\n\n')
f.write(changelog)
7 changes: 7 additions & 0 deletions vendor/github.com/aws/aws-sdk-go/aws/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 3 additions & 37 deletions vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.5.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.9.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6e9918f

Please sign in to comment.