-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fetch Slack users for changelog actors (#16)
This PR is part of our attempt to automate releases to staging. See the apify/apify-core#17156 for full context and next steps. **It introduces following changes:** - New **`github-changelog-authors`** output, that will be populated with a JSON string of changelog commit authors. This will only work if the changelog mode is either `pull_request_commits`, or `commits_compare`. - New **`fetch-author-slack-ids`** input, that when set to `true` will use Slack API to enhance each returned author with a matching Slack ID. Fetching Slack IDs is for now placed outside the critical path: If it fails, the action will still succeed. This should allow for graceful degradation, but if it works reliably, we can change it. **Sample output:** ``` [{name:"Tobiáš Potoček",email:"tobias.potocek@apify.com",slackId:"U0xyz"}] ``` **The PR also tries to improve the overall DX:** - There is a new `watch` script that automatically builds the code. - There is a new `test_action` workflow that executes the action when pushed to a PR. - The `README.md` has been significantly extended.
- Loading branch information
Showing
10 changed files
with
351 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Test the action | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test-release-pr-action: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '16' # Should correspond to .nvmrc | ||
|
||
- name: Test Release pull request action | ||
id: test-action | ||
uses: ./ | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
changelog-scopes: '{ "Action": ["action"] }' | ||
base-branch: 'main' | ||
create-release-pull-request: false | ||
changelog-method: pull_request_commits | ||
open-ai-token: ${{ secrets.OPEN_AI_TOKEN }} | ||
release-name-method: 'tag' | ||
slack-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }} | ||
fetch-author-slack-ids: true | ||
|
||
- name: Print changelog | ||
run: echo "${{ steps.test-action.outputs.github-changelog }}" | ||
|
||
- name: Print authors | ||
run: echo "${{ steps.test-action.outputs.github-changelog-authors }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.