Skip to content

Commit 34e35b5

Browse files
committed
remove extra check for now
1 parent 4121458 commit 34e35b5

File tree

1 file changed

+24
-31
lines changed
  • .github/actions/https-everywhere-labeller

1 file changed

+24
-31
lines changed

.github/actions/https-everywhere-labeller/index.js

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -94,40 +94,33 @@ async function run(alexa) {
9494
})
9595
const fileList = response.data
9696

97-
if (!fileList.every(file => minimatch(file.filename, rulesetGlob))) {
98-
// Don't touch PRs that modify anything except rulesets
99-
console.log(file.filename);
100-
console.log(minimatch(file.filename, rulesetGlob));
101-
console.log('No ruleset files in this PR');
102-
return;
103-
} else {
104-
fileList.forEach(file => {
105-
if(minimatch(file.filename, rulesetGlob)){
106-
console.log('passed match');
107-
108-
// Look at PR changes directly
109-
let matches = file.patch.match(/((host)="([^"]|"")*")/g);
110-
111-
// strip to main domain
112-
if( matches !== null) {
113-
if( alexa.includes(matches[0].slice(6,-1))) {
114-
let index = (matches[0].slice(6,-1))
115-
let rank = alexa.indexOf(index);
116-
117-
if(rank !== null) {
118-
let determined_label = return_label(rank);
119-
console.log('labelling Pull Request');
120-
client.issues.addLabels({
121-
...context.repo,
122-
issue_number: prNumber,
123-
labels: [determined_label]
124-
});
125-
}
97+
98+
fileList.forEach(file => {
99+
if(minimatch(file.filename, rulesetGlob)){
100+
console.log('passed match');
101+
102+
// Look at PR changes directly
103+
let matches = file.patch.match(/((host)="([^"]|"")*")/g);
104+
105+
// strip to main domain
106+
if( matches !== null) {
107+
if( alexa.includes(matches[0].slice(6,-1))) {
108+
let index = (matches[0].slice(6,-1))
109+
let rank = alexa.indexOf(index);
110+
111+
if(rank !== null) {
112+
let determined_label = return_label(rank);
113+
console.log('labelling Pull Request');
114+
client.issues.addLabels({
115+
...context.repo,
116+
issue_number: prNumber,
117+
labels: [determined_label]
118+
});
126119
}
127120
}
128121
}
129-
});
130-
}
122+
}
123+
});
131124
} catch (err) {
132125
core.error(err.stack)
133126
core.setFailed(err.message)

0 commit comments

Comments
 (0)