Open
Description
Describe the bug
When deploying multiple preview channels (e.g., development and production) within a single GitHub Actions workflow, the bot currently updates a single comment in the PR conversation. Initially, it posts the production URL and then edits the same comment to include the development URL. This can be confusing and leads to a less clear separation of information.
Expected behavior
The ideal behavior would be for the bot to create separate comments for each preview URL. This ensures clarity and improves the PR review process by distinctly separating the URLs for different environments (e.g., development and production).
Steps to reproduce
- Set up a GitHub Actions workflow to deploy both development and production versions of an application using FirebaseExtended/action-hosting-deploy.
- Trigger the workflow on a pull request.
- Observe that the bot updates a single comment with both URLs, rather than creating separate comments for each URL.
- Proposed solution
- Modify the action to create separate comments for each deployment when multiple preview channels are deployed within the same workflow. This would enhance the readability and organization of the PR conversation, especially in complex projects with multiple environments.
Example workflow snippet
deploy_dev:
name: "Deploy DEV"
runs-on: ubuntu-latest
needs: build_dev
steps:
- name: 📚 Checkout repo
uses: actions/checkout@v4
- name: ⬇️ Download Development Artifact
uses: actions/download-artifact@master
with:
name: build-dev
path: build/web
- name: 🎯 Deploy to firebase (Preview - DEV)
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: my-project-id
channelId: dev-${{ github.event.pull_request.number }}
expires: 30d
deploy_prod:
name: "Deploy PROD"
runs-on: ubuntu-latest
needs: build_prod
steps:
- name: 📚 Checkout repo
uses: actions/checkout@v4
- name: ⬇️ Download Production Artifact
uses: actions/download-artifact@master
with:
name: build-prod
path: build/web
- name: 🎯 Deploy to firebase (Preview - PROD)
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: my-project-id
channelId: prod-${{ github.event.pull_request.number }}
expires: 30d