Skip to content

Commit 6a80d98

Browse files
committed
Update CHANGELOG.
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
1 parent 905bd44 commit 6a80d98

File tree

2 files changed

+39
-9
lines changed

2 files changed

+39
-9
lines changed

.github/workflows/update_api.yml

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,53 @@ jobs:
2626
run: bundle exec rake slack:api:update
2727
- name: Remove files added by setup-ruby
2828
run: rm -rf vendor
29+
- name: Get current date
30+
id: date
31+
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
32+
- name: Get slack-api-ref ref
33+
id: api-ref
34+
run: echo "::set-output name=api-ref::$(git rev-parse --short HEAD:lib/slack/web/api/slack-api-ref)"
2935
- name: GitHub App token
36+
if: ${{ github.repository == 'slack-ruby/slack-ruby-client' }}
3037
id: github_app_token
3138
uses: tibdex/[email protected]
3239
with:
3340
app_id: ${{ secrets.CI_APP_ID }}
3441
private_key: ${{ secrets.CI_APP_PRIVATE_KEY }}
3542
installation_id: 36985419
3643
- name: Create pull request
37-
id: create-pull-request
44+
id: cpr
3845
uses: peter-evans/create-pull-request@v4
3946
with:
40-
token: ${{ steps.github_app_token.outputs.token }}
41-
commit-message: Update API from slack-api-ref
42-
title: Update API from slack-api-ref
47+
token: ${{ secrets.GITHUB_TOKEN }}
48+
commit-message: Update API from slack-api-ref@${{ steps.api-ref.outputs.api-ref }} (${{ steps.date.outputs.date }})
49+
title: Update API from slack-api-ref@${{ steps.api-ref.outputs.api-ref }}
4350
body: |
44-
Update API from [slack-api-ref](https://github.com/slack-ruby/slack-api-ref)
51+
Update API from [slack-api-ref](https://github.com/slack-ruby/slack-api-ref).
52+
Rev: ${{ steps.api-ref.outputs.api-ref }}
53+
Date: ${{ steps.date.outputs.date }}
4554
branch: automated-api-update
4655
base: master
47-
committer: GitHub <[email protected]>
48-
author: GitHub <[email protected]>
56+
committer: slack-ruby-ci-bot <[email protected]>
57+
author: slack-ruby-ci-bot <[email protected]>
58+
- name: Fetch pull request
59+
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
60+
run: |
61+
git config user.name slack-ruby-ci-bot
62+
git config user.email [email protected]
63+
git pull
64+
git checkout automated-api-update
65+
- uses: jacobtomlinson/gha-find-replace@v3
66+
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
67+
with:
68+
include: CHANGELOG.md
69+
find: "\\* Your contribution here."
70+
replace: "* [#${{steps.cpr.outputs.pull-request-number}}](https://github.com/slack-ruby-client/pulls/${{steps.cpr.outputs.pull-request-number}}): Update API from [slack-api-ref@${{ steps.api-ref.outputs.api-ref }}](https://github.com/slack-ruby/slack-api-ref/commit/${{ steps.api-ref.outputs.api-ref }}) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).\n* Your contribution here."
71+
- name: Update pull request
72+
env:
73+
GITHUB_TOKEN: ${{ steps.github_app_token.outputs.token || secrets.GITHUB_TOKEN }}
74+
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
75+
run: |
76+
git add CHANGELOG.md
77+
git commit --amend --no-edit
78+
git push origin automated-api-update -f

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
### 2.2.0 (Next)
1+
### 2.1.1 (Next)
22

3-
* Your contribution here.
43
* [#458](https://github.com/slack-ruby/slack-ruby-client/pull/458): Add workflow for automatic API updates - [@duffn](https://github.com/duffn).
54
* [#455](https://github.com/slack-ruby/slack-ruby-client/pull/455): Update Slack API: Added pagination to `team.accessLogs` and `AppsDatastore` methods - [@marfoldi](https://github.com/marfoldi).
65
* [#454](https://github.com/slack-ruby/slack-ruby-client/pull/454): Added `Slack::Messages::Formatting#escape` - [@marfoldi](https://github.com/marfoldi).
76
* [#452](https://github.com/slack-ruby/slack-ruby-client/pull/452): Automatically generate Web API multi-argument requirements from docs - [@jmanian](https://github.com/jmanian).
87
* [#448](https://github.com/slack-ruby/slack-ruby-client/pull/448), [#453](https://github.com/slack-ruby/slack-ruby-client/pull/453): Automatically convert more Web API arguments to JSON-encoded strings - [@jmanian](https://github.com/jmanian).
8+
* Your contribution here.
99

1010
### 2.1.0 (2023/03/17)
1111

0 commit comments

Comments
 (0)