Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: Add PR comment with deployment URL #27

Merged
merged 2 commits into from
Oct 7, 2022
Merged

Conversation

juliaogris
Copy link
Member

@juliaogris juliaogris commented Oct 6, 2022

Move firebase deployment and PR commenting machinery into separate
script as it is a bit verbose for a Makefile.

@juliaogris juliaogris changed the title github: Fix continuous deployment for master github: Add PR comment with temp deployment URL Oct 6, 2022
@juliaogris juliaogris force-pushed the pr-comment branch 4 times, most recently from 85156c6 to c9b1328 Compare October 6, 2022 05:28
@juliaogris juliaogris changed the title github: Add PR comment with temp deployment URL github: Add PR comment with deployment URL Oct 6, 2022
@juliaogris juliaogris force-pushed the pr-comment branch 6 times, most recently from 9ef6a7c to 16fa540 Compare October 6, 2022 06:10
@juliaogris
Copy link
Member Author

firebase-deployment: https://evy-lang--dev-jjp3kzei.web.app ()

@juliaogris
Copy link
Member Author

firebase-deployment: https://evy-lang--dev-jjp3kzei.web.app (66d8938)

Copy link
Contributor

@camh- camh- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few comments to get you going

firebase/deploy Outdated Show resolved Hide resolved
firebase/deploy Show resolved Hide resolved
firebase/deploy Outdated Show resolved Hide resolved
firebase/deploy Outdated Show resolved Hide resolved
firebase/deploy Show resolved Hide resolved
firebase/deploy Outdated Show resolved Hide resolved
@juliaogris juliaogris force-pushed the pr-comment branch 2 times, most recently from bd12915 to 88096f8 Compare October 6, 2022 10:16
firebase/deploy Outdated Show resolved Hide resolved
@juliaogris juliaogris force-pushed the pr-comment branch 3 times, most recently from c0afe37 to 975dca8 Compare October 6, 2022 11:15
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

firebase-deployment: https://evy-lang--dev-jjp3kzei.web.app (05417a0)

@github-actions
Copy link

github-actions bot commented Oct 6, 2022

firebase-deployment: https://evy-lang--dev-jjp3kzei.web.app (fe74987)

@juliaogris
Copy link
Member Author

juliaogris commented Oct 6, 2022

firebase-deployment: https://evy-lang--dev-jjp3kzei.web.app (fe74987)

gh api -H "Accept: application/vnd.github+json" /repos/foxygoat/evy/issues/27/comments
finds this last comment as

 {
    "url": "https://api.github.com/repos/foxygoat/evy/issues/comments/1269841022",
    "html_url": "https://github.com/foxygoat/evy/pull/27#issuecomment-1269841022",
    "issue_url": "https://api.github.com/repos/foxygoat/evy/issues/27",
    "id": 1269841022,
    "node_id": "IC_kwDOHw9lvM5LsDx-",
    "user": {
      "login": "github-actions[bot]",
      "id": 41898282,
      "node_id": "MDM6Qm90NDE4OTgyODI=",
      "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/github-actions%5Bbot%5D",
      "html_url": "https://github.com/apps/github-actions",
      "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
      "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
      "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
      "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
      "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
      "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
      "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
      "type": "Bot",
      "site_admin": false
    },
    "created_at": "2022-10-06T11:17:54Z",
    "updated_at": "2022-10-06T11:17:54Z",
    "author_association": "NONE",
    "body": "firebase-deployment: https://evy-lang--dev-jjp3kzei.web.app (fe7498793d529ec5334575a7cdcdc259d1e6d72c)",
    "reactions": {
      "url": "https://api.github.com/repos/foxygoat/evy/issues/comments/1269841022/reactions",
      "total_count": 0,
      "+1": 0,
      "-1": 0,
      "laugh": 0,
      "hooray": 0,
      "confused": 0,
      "heart": 0,
      "rocket": 0,
      "eyes": 0
    },
    "performed_via_github_app": null
  }

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
firebase/deploy Outdated Show resolved Hide resolved
@juliaogris juliaogris force-pushed the pr-comment branch 2 times, most recently from f7d24af to 970206e Compare October 6, 2022 11:35
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

firebase-deployment: https://evy-lang--dev-jjp3kzei.web.app (23a11b5)

Copy link
Contributor

@camh- camh- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💚 I think you've done this script really well. Good on you for giving it a go and realising it's not that hard

firebase/deploy Outdated Show resolved Hide resolved
.github/workflows/cicd.yaml Outdated Show resolved Hide resolved
.github/workflows/cicd.yaml Outdated Show resolved Hide resolved
firebase/deploy Outdated Show resolved Hide resolved
@juliaogris juliaogris force-pushed the pr-comment branch 4 times, most recently from 049b5ad to f01a430 Compare October 6, 2022 22:05
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

firebase-deployment: https://evy-lang--pr27-uzv43y0r.web.app (f01a430)

HELLO!!!

@github-actions
Copy link

github-actions bot commented Oct 6, 2022

UPDATED

@juliaogris juliaogris force-pushed the pr-comment branch 3 times, most recently from b1be57f to 5bc2de8 Compare October 6, 2022 22:42
Howl with an `@here` on Foxygoat slack when the master build fails.
We want to know about this as evy is continuously deployed to Firebase.
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

firebase-deployment: https://evy-lang--27-g4j30emv.web.app (2d8b7b0)

@juliaogris juliaogris force-pushed the pr-comment branch 6 times, most recently from 13d0285 to 1964a20 Compare October 6, 2022 23:34
Move firebase deployment and PR commenting machinery into separate
script as it is a bit verbose for a Makefile.

Post comment with new deployment URL derived from PR number and git sha
of deployed commit. Update comment if already posted previously.

The script can also be run locally and does not comment on a PR with
`make firebase-deploy` which deploys to to `dev` channel. On CI `make
firebase-deploy` the deploy scrip finds the active PR number and
deploys to channel `prNN`. To deploy to prod run `make
firebase-deploy-prod` which deploys to the live channel.

Signed-off-by: Julia Ogris <julia.ogris@gmail.com>
Copy link
Contributor

@camh- camh- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💚 So happy to see your skills growing here.

@juliaogris juliaogris merged commit a134f33 into master Oct 7, 2022
@juliaogris juliaogris deleted the pr-comment branch October 7, 2022 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants