Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] added a new chloggen to track changes to the contrib #125

Merged
merged 9 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/changelog-update.yml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an empty file, can we remove this?

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Update changelog

on:
pull_request_review:
types: [ submitted ]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jobs:
update:
runs-on: ubuntu-latest

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# updated CHANGELOG-AWS.md back to the repository.
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
contents: write
steps:
- name: Checkout action
uses: actions/checkout@v3
- name : checkout
run : |
git config --global user.name 'Github Action'
git config --global user.email '[email protected]'
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ~1.21.1
cache: false
- name: make update changelog
run: make chlog-update-aws
- name: switching from HTTPS to SSH
run: git remote set-url origin https://github.com/amazon-contributing/opentelemetry-collector-contrib.git
- name: check for changes
run: |
git branch
git status
- name: stage changed files
run: git add ./CHANGELOG-AWS.md
- name: commit changed files
run: |
git config --global user.name 'Github Action'
git config --global user.email '[email protected]'
git commit -m "Auto updating changelog-aws.md"
- name: pull from master
run: |
git remote -v
git pull
- name: push code to aws-cwa-dev
run: git push origin aws-cwa-dev
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This action requires that any PR targeting the main branch should add a
# This action requires that any PR targeting the aws-cwa-dev branch should add a
# yaml file to the ./.chloggen/ directory. If a CHANGELOG entry is not required,
# or if performing maintance on the Changelog, add either \"[chore]\" to the title of
# the pull request or add the \"Skip Changelog\" label to disable this action.
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING-AWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ The [CHANGELOG-AWS.md](./CHANGELOG-AWS.md) files in this repo is autogenerated f

The name of your file must be unique since the last release.

During the collector release process, all `./chloggen-aws/*.yaml` files are transcribed into `CHANGELOG-aws.md` and then deleted.

Once the PR has been approved and submitted the changelog-update.yml gets auto trigger to update the changelog-aws.md file.
**Recommended Steps**
1. Create an entry file using `make chlog-new-aws`. This generates a file based on your current branch (e.g. `./.chloggen-aws/my-branch.yaml`)
2. Fill in all fields in the new file
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ chlog-preview-aws: $(CHLOGGEN)

.PHONY: chlog-update-aws
chlog-update-aws: $(CHLOGGEN)
$(CHLOGGEN) update --config $(CHLOGGEN_CONFIG_AWS) --version $(VERSION)
$(CHLOGGEN) update --config $(CHLOGGEN_CONFIG_AWS) --version `date +'%y.%m.%d %H:%M:%S'`

.PHONY: genotelcontribcol
genotelcontribcol: $(BUILDER)
Expand Down