Skip to content

Commit

Permalink
fix actions auth creating duplicate messages (#209)
Browse files Browse the repository at this point in the history
Our slug name was incorrect for GitHub Actions authentication, so duplicate messages were being written.
  • Loading branch information
cdignam-segment authored May 11, 2022
1 parent c5f0328 commit c731fc6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## v0.11.1 - 2022-05-11

## Fixed

- duplicate messages being written when using GitHub Actions token authentication. (#209)

## v0.11.0 - 2022-05-11

## Added

- Support GitHub API authentication via GitHub Actions tokens.
- Support GitHub API authentication via GitHub Actions tokens. (#207)

## v0.10.0 - 2022-04-25

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "squawk"
version = "0.11.0"
version = "0.11.1"
authors = ["Steve Dignam <[email protected]>"]
edition = "2018"
license = "GPL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion github/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl GitHub {
let access_token = create_access_token(&jwt, installation_id)?;

Ok(GitHub {
slug_name: app_info.slug,
slug_name: format!("{}[bot]", app_info.slug),
installation_access_token: access_token.token,
})
}
Expand Down
2 changes: 1 addition & 1 deletion github/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub fn comment_on_pr(
) -> Result<(), GithubError> {
let comments = gh.list_issue_comments(owner, repo, issue)?;

let bot_name = format!("{}[bot]", gh.app_slug());
let bot_name = gh.app_slug();

info!("checking for existing comment");
match comments
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "squawk-cli",
"version": "0.11.0",
"version": "0.11.1",
"description": "linter for PostgreSQL, focused on migrations",
"repository": "[email protected]:sbdchd/squawk.git",
"author": "Steve Dignam <[email protected]>",
Expand Down

0 comments on commit c731fc6

Please sign in to comment.