-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57234 from software-mansion-labs/jnowakow/separat…
…e-build-started-comment-workflow [No QA] Move postGitHubCommentBuildStarted to separate file
- Loading branch information
Showing
4 changed files
with
63 additions
and
73 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
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,45 @@ | ||
name: Post build has been started comment | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
APP_PULL_REQUEST_NUMBER: | ||
description: Number of the Pull Request in the App repository where the comment will be posted | ||
type: string | ||
required: false | ||
HYBRIDAPP_PULL_REQUEST_NUMBER: | ||
description: Number of the Pull Request in the Mobile-Expensify repository where the comment will be posted | ||
type: string | ||
required: false | ||
|
||
jobs: | ||
postGitHubCommentBuildStarted: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Add build start comment to ND PR | ||
if: ${{ inputs.APP_PULL_REQUEST_NUMBER != ''}} | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
const workflowURL = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; | ||
github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: ${{ inputs.APP_PULL_REQUEST_NUMBER }}, | ||
body: `🚧 @${{ github.actor }} has triggered a test hybrid app build. You can view the [workflow run here](${workflowURL}).` | ||
}); | ||
- name: Add build start comment to OD PR | ||
if: ${{ inputs.HYBRIDAPP_PULL_REQUEST_NUMBER != '' }} | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.OS_BOTIFY_TOKEN }} | ||
script: | | ||
const workflowURL = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; | ||
github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: 'Mobile-Expensify', | ||
issue_number: ${{ inputs.HYBRIDAPP_PULL_REQUEST_NUMBER }}, | ||
body: `🚧 @${{ github.actor }} has triggered a test hybrid app build. You can view the [workflow run here](${workflowURL}).` | ||
}); |
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