Skip to content

remove About Ada section from course.yaml after Core Hub port #35

remove About Ada section from course.yaml after Core Hub port

remove About Ada section from course.yaml after Core Hub port #35

Workflow file for this run

name: Labeler
on:
pull_request_target:
types: [opened]
jobs:
label:
name: add label to new PRs
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
script: |
// Get PR description
const msg = context.payload.pull_request.title;
class AdaPullRequest {
constructor(label, column_id) {
this.label = label;
this.column_id = column_id;
}
addLabel() {
github.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: [this.label]
})
}
addToProjectBoard() {
github.projects.createCard({
column_id: this.column_id,
content_type: 'PullRequest',
content_id: context.payload.pull_request.id
})
}
}
if(msg) {
const inDevelopment = msg.includes("In Development");
if(inDevelopment) {
const developmentPullRequest = new AdaPullRequest("needs input", 11161006)
developmentPullRequest.addLabel();
developmentPullRequest.addToProjectBoard();
} else {
const generalPullRequest = new AdaPullRequest("ready for review", 11161002)
generalPullRequest.addLabel();
generalPullRequest.addToProjectBoard();
}
}