Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (() => {
- const filterCommit = (text) => {
- if(text.startsWith('AR-') || text.startsWith('EMAC-') || text.startsWith('AFEM-')) {
- return text.split(':')[0];
- }
- };
- const discussionsCommits = [...document.querySelectorAll('.discussion-item-body a.message')];
- const commits = [...discussionsCommits].map(commit => {
- return filterCommit(commit.textContent)
- }).filter(x => x);
- const releaseCommits = [...document.querySelectorAll('.edit-comment-hide a')];
- const release = [...releaseCommits].map(commit => {
- return filterCommit(commit.textContent)
- }).filter(x => x);
- const diff = release.filter(value => !commits.includes(value));
- const diff2 = commits.filter(value => !release.includes(value));
- if (diff.length > 0 || diff2.length > 0) {
- console.log('Issues:', `${diff.join(', ' )}, ${diff2.join(', ')}`);
- }
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement