-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ignore editor folder * move check issue labels to oppiabot * build actions * split up the pr * create actions build test file and setup ci for it * modify CI config * update dist * setup hooks * testing hooks * testing hooks * build only when actions file changes * testing hooks * remove test comment * modify lint-staged * another test * another test * still testing * final testing * remove actions build test from ci * address review comments * address review comments * Add branding icon and color * setup branding and remove CI
- Loading branch information
1 parent
f59f724
commit d324e27
Showing
7 changed files
with
26,785 additions
and
113 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Oppiabot | ||
|
||
description: Handles user interactions with issues. | ||
branding: | ||
color: purple | ||
icon: activity | ||
|
||
inputs: | ||
repo-token: # Repository token. | ||
description: 'The repository token needed to create comments.' | ||
required: true | ||
|
||
runs: | ||
using: "node12" | ||
main: "dist/index.js" |
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,25 @@ | ||
// Copyright 2020 The Oppia Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS-IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/** | ||
* @fileoverview Automatically compile github actions when | ||
* actions related file changes. | ||
*/ | ||
|
||
const { execSync } = require('child_process'); | ||
|
||
// Build the actions file. | ||
execSync('npm run actions-build'); | ||
// Automatically add the build file to the commit index. | ||
execSync('git add dist/index.js'); |
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,26 @@ | ||
// Copyright 2020 The Oppia Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS-IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/** | ||
* @fileoverview Entry point of oppiabot github actions. | ||
*/ | ||
|
||
const core = require('@actions/core'); | ||
const { context } = require('@actions/github'); | ||
const dispatcher = require('./src/dispatcher'); | ||
|
||
core.info( | ||
`About to dispatch:${context.eventName} and ${context.payload.action}.` | ||
); | ||
dispatcher.dispatch(context.eventName, context.payload.action); |
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,31 @@ | ||
// Copyright 2020 The Oppia Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS-IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/** | ||
* @fileoverview Handles dispatching events and actions to different handlers. | ||
*/ | ||
|
||
const core = require('@actions/core'); | ||
|
||
const EVENTS = { | ||
ISSUES: 'issues', | ||
}; | ||
const ACTIONS = { | ||
LABELLED: 'labeled' | ||
}; | ||
module.exports = { | ||
async dispatch(event, action) { | ||
core.info(`Received Event:${event} Action:${action}.`); | ||
} | ||
}; |
Oops, something went wrong.