Skip to content

Commit

Permalink
fix: 💚 Change workflow to github-script
Browse files Browse the repository at this point in the history
Change from `create-pull-request` to `github-script` to see if no **branch-policy** crash happens again
  • Loading branch information
Anselmoo committed Jul 2, 2023
1 parent 8ce51e0 commit 8b2c7f5
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/update-changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,28 @@ jobs:
commit_message: Update CHANGELOG
file_pattern: CHANGELOG.md
create_branch: true
# Create Pull Request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
- name: Open Pull Request
uses: actions/github-script@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "docs: :memo: Update CHANGELOG for ${{ github.event.release.tag_name }}"
title: "docs: :memo: Update CHANGELOG for ${{ github.event.release.tag_name }}"
body: |
This Pull Request was automatically created by the Changelog Updater Action.
It updates the CHANGELOG.md with the release notes from the latest release.
branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const title = `Merge release/${{ github.event.release.tag_name }} into main`;
const body = `This PR merges release/${{ github.event.release.tag_name }} into main with auto-merge enabled. This PR updates the CHANGELOG.md file.`;
const head = `release/${{ github.event.release.tag_name }}`;
const base = 'main';
const auto_merge = true;
const draft = false;
const pr = await github.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
title,
body,
head,
base,
auto_merge,
draft
});
console.log(`Pull Request ${pr.data.number} created.`);
Release-Documentation:
if: ${{ contains(github.event.release.prerelease, false) }}
Expand Down

0 comments on commit 8b2c7f5

Please sign in to comment.