Skip to content

Commit 58c0f41

Browse files
authored
Merge pull request #462 from duffn/duffn/try-fix-auto-updates
Remove extra steps in automated API updates Action
2 parents bbc5685 + 7ec9540 commit 58c0f41

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

.github/workflows/update_api.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,11 @@ jobs:
1010
contents: write
1111
pull-requests: write
1212
steps:
13-
# Setup and potential creation of initial pull request
1413
- uses: actions/checkout@v3
1514
with:
1615
submodules: recursive
1716
- name: Config git to rebase
1817
run: git config --global pull.rebase true
19-
- name: Get current date
20-
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
21-
- name: Make a file to trigger an initial pull request
22-
run: echo "${{ env.CURRENT_DATE }}" > file.txt
23-
- name: Create initial pull request
24-
id: create-initial-pull-request
25-
uses: peter-evans/create-pull-request@v4
26-
with:
27-
branch: automated-api-update
28-
base: master
29-
# Generation of new API methods and update of pull request
3018
- name: Set up Ruby
3119
uses: ruby/setup-ruby@v1
3220
with:
@@ -36,17 +24,14 @@ jobs:
3624
run: bundle exec rake slack:api:update
3725
- name: Remove files added by setup-ruby
3826
run: rm -rf vendor
39-
- name: Update changelog
40-
run: |
41-
ruby -i -pe 'sub(/\* Your contribution here\./, "* Your contribution here.\n* [#${{ steps.create-initial-pull-request.outputs.pull-request-number }}](https://github.com/slack-ruby/slack-ruby-client/pull/${{ steps.create-initial-pull-request.outputs.pull-request-number }}): Update Slack API (${{ env.CURRENT_DATE }}) - [@slack-ruby-client](https://github.com/slack-ruby/slack-ruby-client).")' CHANGELOG.md
42-
- name: Create pull request with changelog
43-
id: update-changelog
27+
- name: Create pull request
28+
id: create-pull-request
4429
uses: peter-evans/create-pull-request@v4
4530
with:
46-
commit-message: Update API from slack-api-ref (${{ env.CURRENT_DATE }})
47-
title: Update API from slack-api-ref (${{ env.CURRENT_DATE }})
31+
commit-message: Update API from slack-api-ref
32+
title: Update API from slack-api-ref
4833
body: |
49-
Update API from [slack-api-ref](https://github.com/slack-ruby/slack-api-ref) (${{ env.CURRENT_DATE }})
34+
Update API from [slack-api-ref](https://github.com/slack-ruby/slack-api-ref)
5035
branch: automated-api-update
5136
base: master
5237
committer: GitHub <[email protected]>

0 commit comments

Comments
 (0)