Skip to content

Commit

Permalink
update chloggen (open-telemetry#14581)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Boten committed Sep 29, 2022
1 parent 46d8577 commit 5273fbe
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This action requires that any PR targeting the main branch should add a
# yaml file to the ./unreleased/ directory. If a CHANGELOG entry is not required,
# 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 Expand Up @@ -48,34 +48,34 @@ jobs:
if [[ $(git diff --name-only $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} ./CHANGELOG.md) ]]
then
echo "The CHANGELOG should not be directly modified."
echo "Please add a .yaml file to the ./unreleased/ directory."
echo "Please add a .yaml file to the ./.chloggen/ directory."
echo "See CONTRIBUTING.md for more details."
echo "Alternately, add either \"[chore]\" to the title of the pull request or add the \"Skip Changelog\" label if this job should be skipped."
false
else
echo "The CHANGELOG was not modified."
fi
- name: Ensure ./unreleased/*.yaml addition(s)
- name: Ensure ./.chloggen/*.yaml addition(s)
run: |
if [[ 1 -gt $(git diff --diff-filter=A --name-only $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} ./unreleased | grep -c \\.yaml) ]]
if [[ 1 -gt $(git diff --diff-filter=A --name-only $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} ./.chloggen | grep -c \\.yaml) ]]
then
echo "No changelog entry was added to the ./unreleased/ directory."
echo "Please add a .yaml file to the ./unreleased/ directory."
echo "No changelog entry was added to the ./.chloggen/ directory."
echo "Please add a .yaml file to the ./.chloggen/ directory."
echo "See CONTRIBUTING.md for more details."
echo "Alternately, add either \"[chore]\" to the title of the pull request or add the \"Skip Changelog\" label if this job should be skipped."
false
else
echo "A changelog entry was added to the ./unreleased/ directory."
echo "A changelog entry was added to the ./.chloggen/ directory."
fi
- name: Validate ./unreleased/*.yaml changes
- name: Validate ./.chloggen/*.yaml changes
run: |
make chlog-validate \
|| { echo "New ./unreleased/*.yaml file failed validation."; exit 1; }
|| { echo "New ./.chloggen/*.yaml file failed validation."; exit 1; }
# In order to validate any links in the yaml file, render the config to markdown
- name: Render unreleased changelog entries
- name: Render .chloggen changelog entries
run: make chlog-preview > changelog_preview.md
- name: Install markdown-link-check
run: npm install -g markdown-link-check
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ No changelog entry:

### Adding a Changelog Entry

The [CHANGELOG.md](./CHANGELOG.md) file in this repo is autogenerated from `.yaml` files in the `./unreleased` directory.
The [CHANGELOG.md](./CHANGELOG.md) file in this repo is autogenerated from `.yaml` files in the `./.chloggen` directory.

Your pull-request should add a new `.yaml` file to this directory. The name of your file must be unique since the last release.

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

**Recommended Steps**
1. Create an entry file using `make chlog-new`. This generates a file based on your current branch (e.g. `./unreleased/my-branch.yaml`)
1. Create an entry file using `make chlog-new`. This generates a file based on your current branch (e.g. `./.chloggen/my-branch.yaml`)
2. Fill in all fields in the new file
3. Run `make chlog-validate` to ensure the new file is valid
4. Commit and push the file

Alternately, copy `./unreleased/TEMPLATE.yaml`, or just create your file from scratch.
Alternately, copy `./.chloggen/TEMPLATE.yaml`, or just create your file from scratch.

## Adding New Components

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,19 @@ chlog-install:
FILENAME?=$(shell git branch --show-current)
.PHONY: chlog-new
chlog-new: chlog-install
chloggen new -filename $(FILENAME)
chloggen new --filename $(FILENAME)

.PHONY: chlog-validate
chlog-validate: chlog-install
chloggen validate

.PHONY: chlog-preview
chlog-preview: chlog-install
chloggen update -dry
chloggen update --dry

.PHONY: chlog-update
chlog-update: chlog-install
chloggen update -version $(VERSION)
chloggen update --version $(VERSION)

# Build the Collector executable.
.PHONY: otelcontribcol
Expand Down
2 changes: 1 addition & 1 deletion internal/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/pavius/impi v0.0.3
github.com/tcnksm/ghr v0.16.0
go.opentelemetry.io/build-tools/checkdoc v0.0.0-20220706175322-58de0d25b85c
go.opentelemetry.io/build-tools/chloggen v0.0.0-20220909221141-2acdff3badaf
go.opentelemetry.io/build-tools/chloggen v0.0.0-20220928154055-b00fb8eb9066
go.opentelemetry.io/build-tools/crosslink v0.0.0-20220502161954-e2bf744925c0
go.opentelemetry.io/build-tools/issuegenerator v0.0.0-20210920164323-2ceabab23375
go.opentelemetry.io/build-tools/multimod v0.0.0-20220502161954-e2bf744925c0
Expand Down
4 changes: 2 additions & 2 deletions internal/tools/go.sum

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

0 comments on commit 5273fbe

Please sign in to comment.