-
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.
Merge branch 'ubiquibot:development' into development
- Loading branch information
Showing
8 changed files
with
41 additions
and
54 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,18 +1,23 @@ | ||
name: "Conversation Rewards" | ||
description: "Compute rewards for contributors' discussion on issues that are closed as complete." | ||
inputs: | ||
authentication_token: | ||
description: "The GitHub authentication token" | ||
issue_url: | ||
description: "The URL the the issue needing to be parsed" | ||
required: true | ||
outputs: | ||
result: # id of output | ||
description: "The result of a event handler" | ||
value: ${{ steps.main.outputs.result}} | ||
result: | ||
description: "The result containing all the rewards of the users" | ||
value: ${{ steps.main.outputs.result }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
yarn --cwd ${{ github.action_path }} --production=true | ||
yarn --cwd ${{ github.action_path }} start --auth ${{ inputs.authentication_token }} | ||
yarn --cwd ${{ github.action_path }} start --issue "${{ inputs.issue_url }}" --file "${{ github.action_path }}/results.json" | ||
output=$(cat ${{ github.action_path }}/results.json | tr -s ' ' | tr -d '\n') | ||
echo "Output of calculations:" | ||
echo "$output" | ||
echo "Pushing results to REWARDS output" | ||
echo "REWARDS=$output" >> $GITHUB_OUTPUT | ||
id: main | ||
shell: bash |
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,16 @@ | ||
import { IssueActivity } from "./issue-activity"; | ||
import program from "./parser/command-line"; | ||
import { Processor } from "./parser/processor"; | ||
import { parseGitHubUrl } from "./start"; | ||
|
||
async function main() { | ||
const issueUrl = program.opts().issue; | ||
const issue = parseGitHubUrl(issueUrl); | ||
const activity = new IssueActivity(issue); | ||
await activity.init(); | ||
const processor = new Processor(); | ||
await processor.run(activity); | ||
processor.dump(); | ||
} | ||
|
||
main().catch((e) => console.error("Failed to run comment evaluation:", e)); |
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